Linux crontab 的实现

Spoony 54.7m2019-11-15917 次点击1 人感谢
busybox 中 crond 的实现就是一个专门的线程(主线程)在死循环中 sleep
https://github.com/mirror/busybox/blob/master/miscutils/crond.c
https://github.com/mirror/busybox/blob/master/miscutils/crontab.c

ubuntu 中使用的 cron 也是一样的实现方法
https://git.launchpad.net/ubuntu/+source/cron/tree/cron.c?h=ubuntu/bionic#n167

redhat 中也是一样的实现方法
https://github.com/cronie-crond/cronie/blob/master/src/cron.c#L355
收藏 ♥ 感谢
RaspiSQH 117.85m 2019-11-15 
这一点也不优雅。。。没有更好的方法么。。

登录注册 后可回复。



GitHub