我想安排在有限的时间内访问某些网站,比如每天 1 小时。我如何在 Linux 中使用 cron 作业来做到这一点。或者我可以使用 linux squid 服务器来做到这一点吗?
最佳答案
在/etc/crontab 中:
0 18 * * * root /etc/init.d/apache start
0 19 * * * root /etc/init.d/apache stop
apache服务每天18:00开始,每天19:00停止。根据需要调整您的发行版的初始化脚本结构。
关于linux - linux中的作业调度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1863776/