Answer the question
In order to leave comments, you need to log in
Why doesn't .sh run on cron?
Cronetab:
* * * * * /root/script.sh
script.sh:
pm2 delete all
Answer the question
In order to leave comments, you need to log in
In the crontab, you must specify the absolute paths and programs that need to open files.
* * * * * /bin/sh /root/script.sh >> /tmp/script.log
Where is
#!/bin/bash on
the first line?
And the script still needs to be made executable.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question