This will execute the full backup shell script (full-backup) on 20th April 06:40 PM. The basic usage of Cron is to execute a job in a specific time as shown below. # m h dom mon dow command Scheduling a Job For a Specific Time # For more information see the manual pages of crontab(5) and cron(8) # 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/ # For example, you can run a backup of all your user accounts # email to the user the crontab file belongs to (unless redirected). # Output of the crontab jobs (including errors) is sent through # Notice that tasks will be started based on the cron's system # and day of week (dow) or use '*' in these fields (for 'any').# # minute (m), hour (h), day of month (dom), month (mon), # To define the time you can provide concrete values for # indicating with different fields when the task will be run # Each task to run has to be defined through a single line # Edit this file to introduce tasks to be run by cron. To add the new cron job, run the below command – #crontab -e To see a list of Cron Jobs which exists on the machine, run the below command – # crontab -l General Syntax of a Cron Job MIN HOUR Day of month Month Day of Week CommandĠ-59 0-23 1-31 1-12 0-6 linux command or script ![]() In this article, we will teach you on – how to schedule a corn job to execute at a specific time.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |