crontab Linux Commands
What is Linux crontab Command?
crontab COMMAND:crontab command is used to add cron jobs to cron table.
Those jobs are nothing but programs that will run at scheduled time intervals automatically.
crontab [-u user] file [options]
|| It specifies the name of the user whose crontab is to be tweaked.
|| The current crontab will be displayed on standard output.
|| The current crontab will be be removed.
|| This option is used to edit or create cron jobs.
|| This option modifies the -r option to prompt the user for a 'y/Y' response before actually removing the crontab.
The command on execution will list all the cron jobs that already exists. You can either edit or add a new cron job to the table.
*/10 12 * * Mon /bin/sh /home/root/bin/server-backup
*/10 - minutes
12 - hour
* - day of month
* - month of year
Mon - day of week
In the above example, The cronjob 'server-backup' will be running every Monday at 12th hour for every 10 minutes.