Rishi Jasapara
Rishi Jasapara

Reputation: 638

Sending Scheduled Messages through PHP

I have a database of scheduled messages. I want to create a service that continuously runs on the web server (see Windows server) and selects the rows that need to be executed by checking the scheduled time. I want this to happen without any human intervention. Can you please help me in regard to this?

I have done a bit of research and the results that turned up were to use cron jobs. But my hosting is not on Linux, and I need to implement it in PHP.

Upvotes: 1

Views: 185

Answers (2)

primetwig
primetwig

Reputation: 465

1) Use Windows scheduler.

2) You are able to run php-files with:

C:\Path\to\php.exe -f "C:\Path\to\file.php"

Upvotes: 2

Muc
Muc

Reputation: 1526

I would start with a question: do you absolutely have to have such a job run on the web server? I mean, it might be better to isolate the webserver from the cron-like jobs. All you need there is a way to access the scheduled messages databases from somewhere where you can run scheduled tasks.

If you have to do it from within a windows server, I believe you'll have to use a scheduled task (Although, you have to check it with your hosting provider, most don't allow such services).

Upvotes: 1

Related Questions