Live Streaming

Full Version: TIP -- Creating a Cron Job for MySQL Database Cleaning
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Here is how you create a cron job on your server for performing a 'cleanAllOlder' task:

1- Login to your server using SSH

2-
Quote:cd /etc
nano crontab

3- add following code to your crontab file, replacing 'YourURL' (and 'jabbercam', if different) with the one below
Quote:0 * * * * /usr/bin/wget -q -O /dev/null http://YourURL/jabbercam/admin.php?task=cleanAllOlder

4- exit nano by saving the file:
Quote:CTRL+X
y
ENTER

5- execute:
Quote:crontab crontab

That's it!


Above example sets cron job to run evey hour. Other examples are:
Quote:15 5 * * * every day at 05:15
0 * * * * hourly
* * * * * every minute
*/15 * * * * every 15 minutes
0 2,10,19 * * * run 3 times a day: at 02.00, 10.00 and 19.00 hours