Noun Explanation:
Cron system scheduling process that can run jobs at a certain time interval or at a fixed point in time
& Use it to run a process that takes a long time in the background
Note:
Cron is a system scheduling process that can run a job without intervention, allowing the user to submit, edit, or delete the corresponding job through crontab commands.
Each user has a crontab file to hold job scheduling information and run any shell script or command from this command
In large systems, system administrators can disable or allow users to own their own crontab files through the two files of Cron.deny and Cron.allow.
Crontab format: Time-sharing day and month command to run
* * * * *
Crontab Domain: 1th column min 1-59
2nd Column Hour 1-23 (0 = midnight)
3rd Liege 1-31
4th Column Month 1-12
5th Column Week 0-6 (0 = Sunday)
6th List of commands to run
Command options for Crontab:
Format: crontab [-u user]-e-l-r
-U user Name
-e Edit Crontab file
-l lists the contents of the crontab file
-R Delete crontab file
To create a new crontab file:
Modify the. bash_profile file in the $home directory to add environment variables
Editor=vi;export EDITOR//NOTE: Re-login after modification
Delete crontab file
$crontab-R
Recovery of crontab files
If you mistakenly delete the crontab file, assume that there is a backup in the $home directory, you can copy the backup file to/var/spool/cron/<username> username is the user name, if the permissions issue cannot be copied, you can use
$crontab <filename>
Note:filename is the name of the backup crontab file
Restart of crontab
$crond stop
$crond start
Shell Background Execution Command-crontab