作者:中国脐橙在线 | 来源:互联网 | 2023-05-17 18:40
Iwanttocreateacronjobtorunarubyscript.thisiswhatihaveputinthecrontab.我想创建一个cron
I want to create a cron job to run a ruby script. this is what i have put in the crontab.
我想创建一个cron作业来运行ruby脚本。这就是我在crontab中放入的内容。
2 * * * * ruby /home/mark/project/script.rb >> /home/mark/cronOutput.txt
But its not running. I think there's some problem with the environment getting loaded up when the cron runs as root.
但它没有运行。我认为当cron以root身份运行时,环境会出现问题。
Please help.
4 个解决方案