S
S
sangan2020-06-08 12:05:41
PHP
sangan, 2020-06-08 12:05:41

The task scheduler does not work in ispmanager. What could be the problem?

Hello! I created a task in the scheduler on the hosting. The scheduler starts, a report arrives in the mail. The test script writes the current date and time to a text file. The script through the browser works, the file is updated. Why might the scheduler fail to execute the job? There are no error messages. Technical support says that the script is not executed through the console, and they do not provide training in website development. I don't know about servers.
Task: /usr/bin/php72/php /var/www/vh100128/data/php-bin/php.ini /var/www/vh100128/data/www/rodos-sport.ru/cron/new_updater.php >/ dev/null 2>&1
https://rodos-sport.ru/cron/test.txt - text file
https://rodos-sport.ru/cron/new_updater.php - script

Answer the question

In order to leave comments, you need to log in

4 answer(s)
V
Valdemar Smorman, 2020-06-08
@smorman

cron?
How about restarting it?
sudo /etc/init.d/cron restart
och. often without this the task does not work just...

S
Sanes, 2020-06-08
@Sanes

Alternative versions of PHP are found elsewhere.
/opt/php72/bin/php

E
Eugene, 2020-06-23
@zeond

In addition to the comments above - you may have entered the wrong schedule. One that only works at very long intervals. You can try to check it on services that explain how the specified cron schedule will be interpreted by the scheduler. There are a lot of them:
- https://crontab.cronbox.ru/
- https://crontab.guru
- https://crontab.cronhub.io etc.
Also, for your new_updater.php script, you can specify the output to some some file. Like this :
*/15 * * * * /path/to/new_updater.php > result.txt 2>&1
And then see what it writes to this file. Maybe the script crashes in the process of its work.

D
Dmitry Krymtsev, 2020-07-25
@krimtsev

via php
/usr/bin/php -f /var/www/userID/data/www/domain.ltd/cron/rss.php
/opt/php72/bin/php -f /var/www/userID/data/www /domain.ltd/cron/rss.php (for alternative version)
via wget
/usr/bin/wget -O /dev/null -q mysite.tld/cron.php?action=123
if wget accesses https use option " --no-check-certificate"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question