Answers:
我在StackOverflow的标题为“ cron如何在内部计划作业?。
该帖子的摘录和有关cron的Wikipedia文章
The algorithm used by this cron is as follows:
1. On start-up, look for a file named .crontab in the home directories of
all account holders.
2. For each crontab file found, determine the next time in the future that
each command is to be run.
3. Place those commands on the Franta-Maly event list with their corresponding
time and their "five field" time specifier.
4. Enter main loop:
1. Examine the task entry at the head of the queue, compute how far in
the future it is to be run.
2. Sleep for that period of time.
3. On awakening and after verifying the correct time, execute the task
at the head of the queue (in background) with the privileges of the
user who created it.
4. Determine the next time in the future to run this command and place
it back on the event list at that time
标题为:cron如何工作的超级用户问答。涵盖了您的一些其他问题。例如,关于cron如何处理在同一时间计划的作业的问题。该线程中的一个答案表明,当cron守护程序处理每个任务时,它会分叉每个计划的作业,这样就不会有单个作业充当时间重叠的作业的阻止者。