Timed task scheduling
1. Basic overview
2. Schematic diagram of principle
Three, basic grammar
Four, parameter details
Five, application cases
Case 1: Every 1 minute, append the current date information to the /tmp/mydate file
① Write a file first, /home/mytask1.sh
② Give mytask1.sh an executable permission
③ Edit crontab timing tasks
Edit crontab task
view task
*/1 * * * * 表示每隔一分钟执行一次
执行内容为:/home/mytask1.sh 中的内容
④ Successfully executed
Case 2: Every 1 minute, append the current date and calendar to the /home/mycal file
① Write a file first, /home/mytask2.sh
② Give mytask2.sh an executable permission
③ Edit crontab timing tasks
*/1 * * * * 代表每隔一分钟执行一次
执行内容为:/home/mytask.sh 中的内容