R
R
Roman Musalimov2018-09-03 10:19:51
linux
Roman Musalimov, 2018-09-03 10:19:51

How to properly set up Cron on Debian 8?

Good afternoon!
Please tell me, there are several rules in the cron task. The first rule is for every minute, the second every 5 minutes. When these cron tasks are executed, information is updated with a delay, the information is not updated immediately.

*/1 * * * * wget -q -O - http:/тут_ссыка/cron.php?key=Mhbc724bfaiscbsd
0 0 * * * /var/www/dir_name/clear_logs.php
*/5 * * * * /usr/bin/php5.6 -O - -q -t 1 /var/www/dir_name/cron/game_cron.php
0 0 * * * /usr/bin/php5.6 -O - -q -t 1 /var/www/dir_name/cron/other.php

I don't know how to set it up correctly. If you remove 3-4 cron tasks, then everything is fine, it runs as expected at the right time and the information is immediately updated.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Radjah, 2018-09-03
@Radjah

There's some porridge here. Make all binary paths complete.
> wget -q -O -
Why spoil the result in the cron logs?
> /var/www/dir_name/clear_logs.php
No interpreter specified
> /usr/bin/php5.6 -O - -q -t 1
PHP has no "-O" option.

-t docroot     Specify the document root to be used by the built-in web server

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question