我把一个命令crontab,但似乎没有发生。
#vi / etc / crontab
SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin MAILTO=root HOME=/ # For details see man 4 crontabs # Example of job definition: # .---------------- minute (0 - 59) # | .------------- hour (0 - 23) # | | .---------- day of month (1 - 31) # | | | .------- month (1 - 12) OR jan,feb,mar,apr ... # | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat # | | | | | # * * * * * command to be executed 10 * * * * cd /var/www/html/mt; ./tools/run-periodic-tasks ~
而crond正在运行..
# service crond status
- 亚马逊EC2和IRC
- Amazon Linux AMI EC2 PHPfunction识别
- 如何将秘密文件推送到EC2(在AWS上)Ruby on Rails应用程序?
- 如何将主机名或IP保存到我的Amazon EC2实例?
- AWS ec2用户权限被拒绝
# crond (pid 7070) is running...
它假设每10分钟从Movable Type重build一个html。 我在Amazon EC2 Linux 64bit上。
对于系统范围的/ etc / crontab,您还必须指定要运行的用户。 这本身就是一个专栏,在命令运行之前就要走了。
另外,正如Ignacio刚刚提到的那样,为了每10分钟运行一次,就要使用* / 10。
于是
*/10 * * * * USER cd /var/www/html/mt; ./tools/run-periodic-tasks ~
你的规格说“10分钟后”。 试试*/10 。