服务器:乌班图
登入服务器
命令:crontab -l (查看虽有的已经添加的定时任务,注意-前面的空格)
选择编辑器
[root@danny2Tomcat2~]# select-editor
Select an editor. To change later, run ‘select-editor’.
1. /bin/ed
2. /bin/nano <—- easiest
3. /usr/bin/vim.basic
4. /usr/bin/vim.tiny
选择:3
crontab -e (注意-前面的空格)
分 时 日 月 周 +服务器上php的安装位置 +对应项目的url
例如:5 * * * * /seer/php5.5/bin/php /seer/ten**ne/html/shtPc/test.php