【发布时间】:2017-08-02 22:00:43
【问题描述】:
我正在尝试通过 crontab 文件执行位于 /logann/myFile 中的特定脚本。
我已经尝试了很多方法,但没有任何结果。
我在 crontab 文件中添加这一行来调用我的脚本
26 10 * * * root cd /logann && ./apagar_temp_tomcat
(我改测试的时间)
我的脚本是
#!/bin/sh
rm /tmp/tomcat7-tomcat7-tmp/*.tmp
rm /tmp/tomcat7-tomcat7-tmp/*.xml
我只想执行这个脚本。此脚本将删除文件夹 tomcat7-tomcat7-tmp 中的每个 .tmp/.xml 文件。
有什么想法吗?
谢谢你们!
【问题讨论】: