M
M
Michael2021-01-30 14:41:12
System administration
Michael, 2021-01-30 14:41:12

How many commands does crontab -e save?

How to correctly enter jobs in cron if using crontab -e ?
I had the imprudence to first enter one task and then (after 10 minutes) the second
and decided to see (crontab -l) what was saved, as a result, the second task in the cron and the first one disappeared ....

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
vreitech, 2021-01-30
@happy-cat

it saves as many commands as there will be at the time of saving in the editor. if the first task from the cron has disappeared, then it was deleted by someone or something.
what the team says

history | grep -oP '(?<=[\s\d]{7}).*' | grep -oP '^crontab'

?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question