Best way to make PHP Schedule

Asked

Viewed 294 times

0

Good Morning, Everybody

I have a GSM PUSH panel for sending notifications android apps is already working perfectly, but now the need to make a scheduling of push messages.

I thought to do a routine that keeps checking every 30 seconds if you have a record with the sending date less or equal to now date, then register in the CRON task of Cpanel.

That would be the best alternative?

I would like you to have the same options as Cron by scheduling an event now or repeating according to the default setting.

Do you know if you have anything ready?

1 answer

3

Scheduling for PHP via CRON (crontab) is the way I’ve been using it for some time, and without headaches.

I can not say if there is any better way, maybe even have, but I can say that the PHP schedules called through CRON work well.

Remember that the range setting will be set in CRON and not in SCRIPT.

To follow your default PHP settings, it is important to inform in the CRON line the path of your file php.ini.

php -c /etc/php/php.ini /path/seu_script.php

Browser other questions tagged

You are not signed in. Login or sign up in order to post.