Answer the question
In order to leave comments, you need to log in
Why doesn't cron run a bash script?
I have a bash script that edits a text file every few minutes, and if I run the script manually, everything works correctly, but for some reason, crontab -e
with this entry:
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
15 * * * * /var/www/script.sh >/dev/null 2>&1
Answer the question
In order to leave comments, you need to log in
15 * * * * /var/www/script.sh >/dev/null 2>&1
Try:
15 * * * * /bin/bash /var/www/script.sh >/dev/null 2>&1
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question