CubieBoard中文论坛

 找回密码
 立即注册
搜索
热搜: unable
查看: 5182|回复: 1

Lubuntu Server Crontab计划任务问题

[复制链接]
发表于 2015-5-13 20:59:45 | 显示全部楼层 |阅读模式
本帖最后由 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. */1  * * * *  /shell/twdp_graph.sh
复制代码
  1. */1  * * * *  root sudo /shell/twdp_graph.sh
复制代码
  1. */1  * * * *  sh /shell/twdp_graph.sh
复制代码
甚至把twdp_graph.sh改成是twdp_graph这样子放到*/1  * * * *   /shell/twdp_grap也是不行。快疯了!
但是在终端手动执行是没有问题的。
Lubuntu对Shell脚本的执行是如何写的,向群里哥们请教了,谢谢!
回复

使用道具 举报

 楼主| 发表于 2015-5-13 21:01:12 | 显示全部楼层
另外补充一点,目录权限我也考虑到了,已经chmod 777 twdp_graph.sh,chown user1.user1 twdp_graph.sh
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|粤ICP备13051116号|cubie.cc---深刻的嵌入式技术讨论社区

GMT+8, 2024-5-1 20:40 , Processed in 0.020672 second(s), 15 queries .

Powered by Discuz! X3.4

© 2001-2012 Comsenz Inc. | Style by Coxxs

返回顶部