E
E
Evgeny Matveev2018-12-07 06:21:27
linux
Evgeny Matveev, 2018-12-07 06:21:27

How to disable cron from console?

there is no panel and there is no desire to put it on for a minute.
Tell me how you can disable and enable an already created cron task from the console
* * * * * /usr/bin/php -q /var/www/myb2bmails/data/www/myb2bmails.ru/apps/console/console.php send-campaigns >/dev/null 2>&1

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Eugene, 2018-12-07
@immaculate

Execute the command crontab -eand put a comment mark at the beginning of the line #.

P
pfg21, 2018-12-07
@pfg21

if about a one-liner on / off, then so.
# sed 's/test/another test' ./myfile
i.e. one script to turn off a command - put # # sed ' s
/<command>/#<command>' in /etc/crontab
and another script to include a command - remove #
# sed 's/#<command>/<command>' /etc/crontab
option2: use /etc/cron.d if your cron can do that.
create a file in it with the necessary lines.
to turn it off, move it to some directory thread, to turn it on, move it back to /etc/cron.d

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question