简体   繁体   English

Cron时间设置

[英]Cron time setup

Setting up cron is confusing, although I managed to set it to run every hour, but I can't quite figure how to change to run every 10 mins. 设置cron令人困惑,尽管我设法将其设置为每小时运行一次,但是我不太清楚如何更改为每10分钟运行一次。 This is the UI in admin panel: 这是管理面板中的用户界面:

在此处输入图片说明

Not sure what that specific UI interface allows...but if you can multi-select (hold down "ctrl" and click other minutes)...then just select 0,10,20,30,40,50 不确定特定的UI界面允许什么...但是如果您可以多选(按住“ ctrl”并单击其他分钟)...则只需选择0,10,20,30,40,50

If you have access to actually edit the REAL crontab commands...the format is like this: 如果您有权实际编辑REAL crontab命令...格式如下:

0,10,20,30,40,50 * * * * /path/to/command

Or...to simplify this, the "better" way is like so: 或者...为了简化这一点,“更好”的方式是这样的:

*/10 * * * * /path/to/command

The Cron should be like this: Cron应该是这样的:

*/10 * * * * /home/backup.sh * / 10 * * * * /home/backup.sh

If you have access to your servers shell use the following command: 如果您有权访问服务器外壳,请使用以下命令:

$ crontab -e $ crontab -e

See: Cronjob every minute 请参阅: 每分钟Cronjob

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM