M
M
Max Payne2018-04-23 20:37:18
ubuntu
Max Payne, 2018-04-23 20:37:18

Why are crontab tasks not running?

I use Ubuntu 16.04, I put tasks in /etc/crontab, because they don't work anywhere else. But now they have stopped there.
Contents of the /etc/crontab file

SHELL=/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

0 */6 * * * root screen -dmS bot /bin/bash /home/madmonday/v2/outputstart.sh
55 3 * * * root /usr/bin/python3 /home/madmonday/v2/backup.py
55 15 * * * root /usr/bin/python3 /home/madmonday/v2/backup.py
56 3 * * * root /sbin/shutdown -r now

@reboot screen -dmS bot /bin/bash /home/madmonday/v2/outputstart.sh

What could be the reason? I sinned on the outputstart.sh/backup.py files themselves, but it turns out that the server does not reboot.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
pfg21, 2018-04-24
@pfg21

write scripts for systemd, cron is slowly floating away with charon on styx.
check if cron is working? I disabled it altogether on 16.04
systemctl status cron

I
Igor Nikolaev, 2018-04-24
@nightvich

What is there to think?
If you need to run the application as root, put it in the root user's cron or run su / sudo.
For a large number of cron tasks, especially for pythonists, which, apparently, you are now fashionable to use airflow.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question