Cron Job Tutorial: Crontab Scheduling Syntax and Script Example
Dec 08, 2010, 21:02 (0 Talkback[s])
(Other stories by I)
Re-Imagining Linux Platforms to Meet the Needs of Cloud Service Providers
"Crontabs is very useful when doing website maintenance. You can
use this feature for the following purposes:
"1. Deleting all files in a certain folder at regular intervals.
If you accept user-uploaded files, then eventually it will clog
your web hosting server. If you do not regularly delete these
files, they will consume a lot of disk space and can slow down your
"2. Deleting files of a specific type at regular intervals. You
can also choose to delete files of a specific type, instead of
deleting all of the files in the folder. If you have PHP, HTML and
MP3 files together inside the folder, you can delete only the MP3
"3. Regularly backing up your MySQL database. This is one of the
most important webmaster tasks. By using crontabs or the cron job
feature, you can create a PHP script that will back up a selected
MySQL database, and have it execute automatically executed at a
specific, regular interval (e.g monthly, yearly, etc).
"This tutorial will focus on creating a cron PHP script
application, then configuring your cron hosting feature to execute
these scripts automatically."