D
D
Dima_kras2019-09-04 10:05:39
Debian
Dima_kras, 2019-09-04 10:05:39

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

3 answer(s)
D
Dima_kras, 2019-09-11
@Dima_kras

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 example
root crontab -l 1.txt

R
Ronald McDonald, 2019-09-04
@Zoominger

See what the task is. If it is in cron.daily or similar, then yes. If manually, then check /var/spool/cron .

A
Andrey Barbolin, 2019-09-04
@dronmaxman

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 question

Ask a Question

731 491 924 answers to any question