Autostart php script using Task scheduler to send emails

I have an event calendar table and a sign-up table where the person signing up would like to receive notifications from the event calendar. I can write a script that will check the event calendar table and if an event is to start 24 hours from now I would like to send an email to all persons wanting to receive notifications. How can I run the PHP script that sends an email with the calendar event to all persons wanting email notifications from the calendar.

I'm thinking along the line of task scheduler on my IIS server. Running PHPStorm every x number of minutes using he script run.php.

Please provide example if possible.

Thanks in advance.
Rich


 


 


 


 


 


 


 


 


 


 


 


 


 


 


 


 

2 comments
Comment actions Permalink

The question seems to be not really IDE-specific and I guess you would receive a lot more replies on stackoverflow.com.

0
Comment actions Permalink

I have figured out how to do this. Create a PHP script (e.g. SendEmail.php), then schedule a task on the server with the following command:

c:\php\php.exe -f SendEmail.php

Much simpler than I thought.

Rich

0

Please sign in to leave a comment.