B
B
bagos2014-03-07 13:29:10
Task Schedulers
bagos, 2014-03-07 13:29:10

Why can't the crontab file be edited?

When working with cron (in windows), I noticed a feature. That the file needs to be edited directly in vi itself, i.e. crontab -e. And if we say take your file and substitute it for the one created with -e. That file works clumsily, not all tasks are performed. Any guesses what it might be related to? And if you edit the file created by the crontab with the same notepad, then everything is fine. Could it be an encoding problem?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
B
bagos, 2014-03-07
@bagos

Thanks @sonic_spb . And so it turned out. \n at the end is required.

S
Sergey, 2014-03-07
@bk0011m

A strange question, It's like asking: "Why put porridge in your mouth? Maybe right in your stomach!"
crontab -e is needed so that you do not make mistakes when editing. I strongly recommend doing just that, and nothing else.
But if you want trouble:
1. stop the "crond" daemon
2. overwrite the file
3. start the daemon

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question