另一个:- Cronjob 不工作
我有一个 cronjob,它与其他有效的 cronjob 完全相同。但是,对于某些人来说,我从中看不到任何东西:-
* * * * * /usr/bin/php -f /var/www/vhosts/process/sync.php > /var/www/vhosts/process/logs/synclog.log 2>&1
我想跑步每一分钟、每一天、永远。但是,该脚本不会被执行。我知道这一点,因为我可以从 CLi 运行它并且它可以工作,并且可以输出文件。
命令有问题吗?如果没有,有没有办法监视此命令以便我可以看到问题?
我还检查了权限,它们与其他有效的文件相同。
非常感谢您的帮助。
I have a cronjob, which is ni-on identical to other cronjobs that do work. But, for some I see nothing from this:-
* * * * * /usr/bin/php -f /var/www/vhosts/process/sync.php > /var/www/vhosts/process/logs/synclog.log 2>&1
I want to run every minute, of every day, forever. However, this script isn't be actioned. I know this as I can run it from CLi and it works, as well as outputting a file.
Is there something wrong in the command? If not, is there a way to monitor this command so I can see the issues?
I've also checked the permissions, and they're identical to the other files that do work.
Many thanks for any help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
一些 Linux 服务器使用不同的语法。要每分钟运行一个作业,有 3 种方法。
根据服务器和设置,其中之一应该可以工作。既然您已经说过第一个不会,请尝试其他两个中的一个。我知道我的托管服务器,我无法使用 */1。
some linux servers use different syntax. To run a job every minute there is 3 ways.
Depending on server and setup one of these should work. Since you already stated the first does not, try one of the other two. I know my hosting server, I cannot use */1.