A
A
a000_000a2018-05-16 14:45:59
linux
a000_000a, 2018-05-16 14:45:59

Why is Cron not executing scheduled jobs?

Tell me why cron can not work out the schedule and how to troubleshoot such reasons?

# run-parts
0 * * * * root run-parts /home/user/script

Answer the question

In order to leave comments, you need to log in

4 answer(s)
F
Fixid, 2018-05-16
@a000_000a

1. When run as root, does it work if run from any folder?
2. If it works, then check for an empty line at the end of crontab
3. sudo crontab -e
each user has his own crontab and if you are editing as a normal user, then privilege escalation will not work.
To run cron as root edit cron as root

S
Saboteur, 2018-05-17
@saboteur_kiev

# run-parts
0 * * * * root run-parts /home/user/script

This is generally in what crontab?
If this is in the user, then root is superfluous.
If not in the user, then I suspect that it does not find run-parts - specify the full path to run-parts

A
Alexander Aksentiev, 2018-05-16
@Sanasol

cat /var/log/syslog | grep 'cron'

M
moropsk, 2018-05-16
@moropsk

1. Is the path to the file correct?
2. Is the permission to execute the file set to chmod +x
3. When run from the console, is the file executed?
In general, there is little information.
What is the file and what are the errors?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question