0

Possible Duplicate:
schedule an email in php

I want to schedule my php script which sends emails using windows services as the website is hosted in windows machine. I am looking for a solution which does not involve cron jobs. I want users to schedule a time and the windows service should execute my php email script on the scheduled time so that emails are sent on the scheduled user time. I want to write the entire code in php.

Community
  • 1
  • 1
Sahil Jariwala
  • 243
  • 2
  • 5
  • 19
  • If you couldn't have the windows scheduler, the alternative would be call your email sending php page from some other linux server's cron job. I'm sure there are free hosting providers with cron job features as well. – User 99x Oct 16 '12 at 06:58
  • cron job will make my server busy. My database is having 900000 + records. So it will be an infeasible solution – Sahil Jariwala Oct 16 '12 at 07:01

1 Answers1

1

You don't have access to cron jobs on a Windows Machine ;) But, there isn't a way to do that without the window's scheduler unless you have a VERY active site where someone is always on it, and then you can check and run on each page load or something similar. Otherwise, I would write a script that checks the DB for when emails are suppose to be sent - and pull the ones that are suppose to be ran that minute (or half-hour, or whatever intervals you allow your users to select from), and schedule run that script every minute/interval via the windows scheduler.

Jon
  • 4,746
  • 2
  • 24
  • 37