我想在每周的每一天的特定时间运行一个程序。我怎样才能做到这一点 ? 我的操作系统是 ubuntu。 谢谢
最佳答案
这称为 crontab。使用命令 crontab -e 可以添加任务。
crontab 文件中的一行如下所示:
* * * * * command to be executed
┬ ┬ ┬ ┬ ┬
│ │ │ │ │
│ │ │ │ │
│ │ │ │ └───── day of week (0 - 7) (0 or 7 are Sunday, or use names)
│ │ │ └────────── month (1 - 12)
│ │ └─────────────── day of month (1 - 31)
│ └──────────────────── hour (0 - 23)
└───────────────────────── min (0 - 59)
关于linux - 经常在特定时间做某事,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13647711/