Cron is a timed execution tool under Linux that can run a job without human intervention. Since Cron is a built-in service for Linux, it does not automatically get up, and you can start and shut down this service in the following ways: 1.cron Start-up /sbin/service crond Start//Startup service
/sbin/service Crond stop//Shut down service
/sbin/service crond Restart//Restart service
/sbin/service Crond Reload//Reload configuration You can also start the service automatically when the system starts: At the end of the/etc/rc.d/rc.local script, add:
/sbin/service Crond start 2. Add a task ScheduleVi/etc/crontabAdd a task1* * * * root run-parts/etc/cron.hourly//hourly execute all scripts in/etc/cron.hourly folderor1* * * * root/etc/cron.hourly/a.sh//Hourly Execution a.sh script3. Task Time Description
minute -integer from 0 to 59
Hour -integer from 0 to 23
Day -an integer from 1 to 31 (must be a valid date for the specified month)
Month -integers from 1 to 12 (or months such as Jan or Feb)
DayOfWeek -integers from 0 to 7, 0 or 7 for Sunday (or represented by sun or mon shorthand)