[英]How do I execute script using crontab
I have a script inside a folder path /home/rohit/Report/test.sh
I want to run this script using crontab
every 5 minutes 我在文件夹路径
/home/rohit/Report/test.sh
有一个脚本我想每隔5分钟使用crontab
运行一个脚本
I opened terminal any type these command 我打开终端任何类型这些命令
crontab -e
write this line in crontab 在crontab中写下这一行
5 * * * * rohit /home/rohit/Report/test.sh
save and exit. 保存并退出。
but It does not execute script. 但它不执行脚本。
Am I doing anything wrong. 我做错了什么。
my test.sh
is 我的
test.sh
是
ruby file1.rb
ruby file2.rb
file1.rb and file2.rb are also present in that folder file1.rb和file2.rb也存在于该文件夹中
试试这个,
*/5 * * * * /home/rohit/Report/test.sh
我建议你使用时的宝石来管理你的cron作业。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.