Answer the question
In order to leave comments, you need to log in
How to edit cron on Debian via file, not via corntab -e?
Hello. There are several Raspberries with Debian (Raspbian), for all you need to change the job in cron. I do not want to do it manually via ssh and crontab -e.
Tasks for two users pi and root are now configured, they need to be changed.
Is there a way to do this by replacing the file?
Answer the question
In order to leave comments, you need to log in
As a result, I did this:
1. I receive the current tasks in a file
2. I edit them
3. I write them down
If you need to do it for another user, you need to add a username, for exampleroot crontab -l 1.txt
See what the task is. If it is in cron.daily or similar, then yes. If manually, then check /var/spool/cron .
Here is an example of such a file.
cat /etc/cron.d/rancid
┌([email protected])─(✗)─(10:18 AM Wed Sep 04)─(54 files, 165Mb)
└─(~)─>cat /etc/cron.d/rancid
# run config differ hourly
# clean out config differ logs
50 23 * * * rancid find /var/log/rancid -type f -mtime +2 -exec rm {} \;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question