Answer the question
In order to leave comments, you need to log in
How to run crontab -e command at system startup?
1. Made a vpsk on Hetzner
2. Set up cron there
3. I give a snapshot I raise
20 copies and cron does not work on half of them. And it starts working only after I write open the cron through the command:
crontab -e
the solution is needed "quick", so I think it would be nice to just run the crontab -e command once at system startup
Answer the question
In order to leave comments, you need to log in
Maybe:
sudo crontab -e; sudo /etc/init.d/cron restart
with this option, the task is written to a file:
/var/spool/cron/crontabs/root
and Cron itself is restarted and the task will be executed as root.
The fact is that very often, having registered a task in Cron , it does not work until you restart it ...
And if it's simple:
crontab -e
(without sudo )
then the task is written to a file:
/var/spool/cron/crontabs/имя_пользователя_в_системе
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question