Hey, anyone use Cron jobs to do stuff? I’m not sure what exactly it can do and it can’t do. Any suggestions? Also, where can I get scripts?
WTF is a cron job?
Never heard of them? I have them since I own a domain, it’s in the cPanel Control Panel. It’s suppose to backup databasese automatically somehow, but I’m not too sure.
oh… That would be host specific. The only people that will know how to use that are people that have the same host as you.
A cron job is a script that runs every so often. For instance, you could have a script like this:
<?php
$fileCon = fopen("daysUp.txt", "A+");
fputs($fileCon,"1");
fclose($fileCon);
?>
then you could run this script every day at midnight, and you would have a counter in a textfile of how many days your site had been up.
Do I need to put anything in Cron to show that script?
I’m sorry, I have no experience actually using cron jobs. I just happen to know what they are :-\
Nuts, I tried looking for it online…no one knows too much about them and scripting them.
Max if you don’t really know what they are why do you want to use them?
Yes, because I liked automated stuff, and my database does need to be backed up.
If you need your database backing up, you can use PHPMyAdmin, if your host supports it. There is a built in way of exporting the database to a .cvs file, I believe =)
I mean like automatically which I think Cron can do.