Ale*_*xar 2 linux services cron
我希望服务在 8:00 开始并在 14:00 自动结束
我已经通过以下方式手动执行此操作:
/etc/init.d/myservice.sh start
/etc/init.d/myservice.sh stop
Run Code Online (Sandbox Code Playgroud)
我认为它应该与 cron 工作有关。任何的想法?
minutes | hour | day | month | day of week | username | command
0 8 * * * myuser /etc/init.d/myservice.sh start
0 14 * * * myuser /etc/init.d/myservice.sh stop
Run Code Online (Sandbox Code Playgroud)
替换myuser为任何合适的。(可能是根)
此外,属于 serverfault 或超级用户
| 归档时间: |
|
| 查看次数: |
2376 次 |
| 最近记录: |