E
E
Evgeny Matveev2018-03-20 15:41:21
Task Schedulers
Evgeny Matveev, 2018-03-20 15:41:21

How to register CRON in seconds correctly?

There is a job that runs every minute
Sending messages every minute.
* * * * * /usr/bin/php -q /var/www/b2bmails/data/www/b2bmails.ru/apps/console/console.php send-campaigns >/dev/null 2>&
1 the same task that is processed every 20 seconds, for example, and how much is it fraught with load on the server?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
E
Evgeniy Matveev, 2018-03-20
@raebg

and what does the value 2>&1 mean

D
Dimonchik, 2018-03-20
@dimonchik2013

there is no cron in seconds, in the second script, set
2>&1, which means that the second type of messages should be displayed where the first type
types are - 1) execution and 2) errors

E
enabl3, 2018-03-21
@enabl3

Run the task every 20 seconds
*/1 * * * * root /home/mybin/script.sh; /bin/sleep20; /home/mybin/script.sh /bin/sleep20; /home/mybin/script.sh

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question