netken81 发表于 2015-5-13 20:59:45

Lubuntu Server Crontab计划任务问题

本帖最后由 netken81 于 2015-5-13 21:04 编辑

写了Shell两个脚本,发现放到crontab里不起效果。之前放在CentOS和Redhat AS都能加载执行的。难道是系统语言环境变化了?
我尝试把#!/bin/bash改成#!/bin/sh 和#!/bin/dash都不行。
试过放到/etc/crontab, crontab -e,crontab -u user1 -e三者都放进去也不行。我就郁闷了。
具体内容如下:*/1* * * */shell/twdp_graph.sh*/1* * * *root sudo /shell/twdp_graph.sh*/1* * * *sh /shell/twdp_graph.sh甚至把twdp_graph.sh改成是twdp_graph这样子放到*/1* * * *   /shell/twdp_grap也是不行。快疯了!
但是在终端手动执行是没有问题的。
Lubuntu对Shell脚本的执行是如何写的,向群里哥们请教了,谢谢!

netken81 发表于 2015-5-13 21:01:12

另外补充一点,目录权限我也考虑到了,已经chmod 777 twdp_graph.sh,chown user1.user1 twdp_graph.sh
页: [1]
查看完整版本: Lubuntu Server Crontab计划任务问题