Answer the question
In order to leave comments, you need to log in
Why aren't cron jobs running?
Wrote 2 simple scripts: one sends a query to the database, the other just 'echo hello' (for testing)
I added tasks via crontab -e, there is an empty line at the end of the file. Tried adding user std between five * and script path, didn't work. I do not have access to root, if that.
Both scripts are executed if run manually. I did it on a screenshot.
Answer the question
In order to leave comments, you need to log in
1. Exhaust in the CODE tag, not a picture
2. SHELL=bin/sh
but it should be SHELL=/bin/sh
3. Cron-tasks are performed in a slightly different environment. For example, there is another PATH. It makes sense to specify full paths or write PATH explicitly
4. It's not a bad idea to write ">>/file.log" in the logs, but ">>/file.log 2>&1". This is how it fixes errors.
the record is that this script is at the beginning, the rights of the file are executable?
chmod a+x to your scripts.
And then from the shell you run them through the sh script, but for some reason they are not in the crown.
You either wear a cross, or ...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question