08-05-2002, 04:34 PM
ok so im working on a script that is all cool and stuff and works fine.. but it needs to run every hour... i know that cron can automaticly run the script every hour.. but how?
would it be from a diferent script?
Check this answer from the old forums...( I don't feel like re-typing it) :p
08-09-2002, 05:09 PM
here's a simple, and short :), tutorial on crontab, http://www.superscripts.com/tutorial/crontab.html
Depending on how your system is setup, you normally do 1. crontab -l > crontabfile.edited 2. edit the file, add a two digit number for the second, a two digit number for the hour, then for the day, month, and day of the week, then the script. It would look something like this
00 * * * * ..../cgi-bin/yourscript.cgi ( this would run every hour on the hour )
finally 3. crontab crontabfile.edited ( this copies crontabfile.edited to the current list of scripts that cron should run )
check and see if you're script got added to the list, crontab -l.
Anyways the tutorial is really good, and does alot better job of explaining than I did.