FRIHOST • FORUMS • SEARCH • FAQ • TOS • BLOGS • COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


what can a cron job do for you?





venc
I review site-helper.com, but it didnt help much. I was wondering, what can you do with a cron job, and how?
Sunny
Cron jobs are used to schedule the tasks. Mostly users don't need this feature.
hexkid
cron is for Unixes what "Scheduled Tasks" is to Windows.

You can schedule a program to run at various/specific times, for example, select from a database all users that haven't updated their profile and mail them a warning message.

To use it, you run the crontab command. The "-l" option lists the current entries for the user; the "-e" option edits the user's crontab.

On my Linux machine, I have this:

~$ crontab -l
@monthly echo "Review log files" | mail -s "Log files" [myusername]
4 5 * * 3 /home/[myusername]/.linuxcounter/machine-update -m
0 * * * * /home/[myusername]/bin/allhours.sh

which means that
on every 1st day of every month I get a mail to remind me to Review log files;
on every Wednesday at 05:04 the "machine-update" command is run;
and that at every hour of every day tke "allhours.sh" shell script is run.


You can have a look at the Unix manual for crontab @ http://www.opengroup.org/onlinepubs/007908799/xcu/crontab.html
Related topics
cron jobs
Questions about cron jobs and permissions
Cron Job to Backup MySQL Database
cron job
How to run a cron job on a server
Database/PHP/Cron Jobs [Resolved]
Cron job
Cron job and browser output question
Cron job
ΏCron Job en Frihost?
How to get a php script working under a cron job?
Run a php Script with a Cron Job
Possible cron job usage?
Cron Job usage on FriHost
Reply to topic    Frihost Forum Index -> Support and Web Hosting -> Web Hosting Support

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.