Some things happen every day - or twice a day, or weekly ... in the background behind our web site - things like the rotation of log files, generation of reports and copying the
Opentalk Forum into
archives.
We don't trigger these things manually!
On Unix and Linux systems, your crontab lets you set up jobs to be run in a regular (or irregular) pattern according to day of month, month, hour, minute and day of week. Simply use the command
crontab -e on your server to edit your crontab, and insert one line per job required. For example:
11 13 * 3-9 * cp /home/wellho/summerpm.jpg /home/wellho/public_html/iotd.jpg
would copy an image called "summerpm" to an image called "iotd" at 11 minutes after the hour of 13, every day on the month, March to September only, every day of the week and:
1 2 * * 6 cp /home/wellho/weekend.jpg /home/wellho/public_html/iotd.jpg
would copy the image called weekend at one minute after 2 every Saturday morning.
Not every web space provider allows you to run crontab jobs, but if it's there for you, it's an invaluable tool. Just remember to
never type in the word "crontab" on its own as it deletes all your existing jobs and replaces them with whatever you care to type at the keyboard!
(written 2005-12-27 14:37:34)
Associated topics are indexed under
A164 - Web Application Deployment - Services and Regular Jobs [2182] What Linux run level am I in? - (2009-05-15)
[2145] Using the internet to remotely check for power failure at home (PHP) - (2009-04-29)
[1903] daemons - what is running on my Linux server? - (2008-11-23)
[1765] Dialects of English and Unix - (2008-08-21)
[1733] memcached - overview, installation, example of use in PHP - (2008-08-02)
[1731] Apache httpd, MySQL, PHP - installation procedure - (2008-08-01)
[1700] FTP server on Fedora Linux - (2008-07-06)
[1633] Changing a screen saver from a web page (PHP, Perl, OSX) - (2008-05-06)
[1553] Automatic startup and shutdown of Tomcat - (2008-02-24)
[1288] Linux run states, shell special commands, and directory structures - (2007-08-03)
[1028] Linux / Unix - process priority and nice - (2007-01-10)
[907] Browser -> httpd -> Tomcat -> MySQL. Restarting. - (2006-10-28)
Some other Articles
San FranciscoTaking the dog for a walkThe relevance of the hairy woodpeckerIs training seasonal?Repeating tasks with crontabThe world didn't stop for ChristmasMorning image, afternoon imageChristmas is for everyoneChristmas Partyrich and famous