Reputation: 43
When a user adds a video to my website, I'd like to send an email one hour after their post, alerting them that it has been uploaded and is ready for their review.
Anyway to do this using Windows Task Scheduler? The email is sent using a php file, so ideally the php file would run and then an hour after it runs is when the email is sent.
Upvotes: 1
Views: 944
Reputation: 12834
Some assumptions:
Assuming the above three are true you can have a Task Scheduler entry like
C:\Path\to\php.exe -f "C:\Path\to\send_email.php"
If you are using older versions of Windows which does not allow you to enter commands in it but only select a program, then save this command as a batch file
and select it from the interface
Now bear in mind if you want it to send emails after exact one hour then you will need to schedule this task to run every minute.
Upvotes: 1