Wireless Army
This is a blog / tips and tricks website for web developers and security researchers.
follow us in feedly


cron tab
by admin
 at 2017-12-24 13:01:00.

this is a tool that lets you schedule script:

you can add one per line with the command crontab -e

you can use this site time easily find the comand for the schedule that you want

*     *     *   *    *        command to be executed
-     -     -   -    -
|     |     |   |    |
|     |     |   |    +----- day of week (0 - 6) (Sunday=0)
|     |     |   +------- month (1 - 12)
|     |     +--------- day of        month (1 - 31)
|     +----------- hour (0 - 23)
+------------- min (0 - 59)

examples:

00 00 * * * Daily at midnight

00 00 * * 3 Each Wednesday at midnight

00 00 1 * * At midnight, on the first day of each month

30 22 * * 1-5 every weekday at 10:30 P.M

0 9-17 *  0,6 every hour, on the hour, from 9 AM. through 5 PM., every weekend.

exmaple commands:

00 00 * * mysqldump -u root -p PASS database > /root/db.sql #mysql backup

00 00 * * /usr/bin/php /var/www/cron.php #run php script

00 00 * * /bin/bash /root/Documents/update.sh #bash script