Answer the question
In order to leave comments, you need to log in
How to run script in cron?
Hello. It seems to be a rather trivial task, but I've been worrying about it all evening.
The task is simple, execute reload.sh once a minute
What I do, I go to crontab -e
add: */1 * * * * /reload.sh >/tmp/wp.sh.log 2>/tmp/wp.sh.error .log
script is even just put in the root of the server. But the script is not executed, it outputs to the logs:
cat /tmp/wp.sh.error.log
/bin/sh: 1: /reload.sh: not
found for some reason it doesn't find it.. But it's definitely at the root, it's definitely there, and it's definitely working:
cat /reload.sh
#!/bin/bash
echo "done";
chmod +x did.
Answer the question
In order to leave comments, you need to log in
*/1 * * * * /bin/bash /reload.sh >/tmp/wp.sh.log 2>/tmp/wp.sh.error.log
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question