Manual-cronjob-shell

Via the “crontab” command from the shell.
crontab -l will show you your currently set up cron jobs on the server.

crontab -r will delete your current cron jobs.

crontab -e will allow you to add or edit your current cron jobs by using your default text editor to edit your “crontab file”.

Note, vi has a bug in it and will not work to edit your crontab! We recommend nano (which is just like pico), which is the default editor anyway!

Your crontab includes all the cron jobs you’d like, with one cron entry per line. A cron entry looks like this:

45 2 * * *     /home/user/script.pl

The first number is the minute of the hour for the command to run on.
The second number is the hour of the day for the command to run on.
The third number is the day of the month for the command to run on.
The fourth number is the month of the year for the command to run on.
The fifth number is the day of the week for the command to run on.
Here are some examples to help you learn the syntax for the numbers:

32 * * * * : will be run every hour on the 32nd minute.
12,42 * * * * : will be run twice an hour on the 12th and 42nd minutes.
*/15 */2 * * *: will be run at 0:00, 0:15, 0:30, 0:45, 2:00, 2:15, 2:30, …
43 18 * * 7: will be run at 6:43pm every Sunday.

Example for JAVS:
This cron job will run every 15 minutes.

*/15 * * * * /usr/bin/curl  http://www.justanothervideoscript.com/admindemo/includes/cron_encode.php?cronpass=cronpass

Leave a comment

You must be logged in to post a comment.