hi all,...
i have a problem here which is: i want to send a notification to the user before 2 days to a specified date he entered in db (i.e i want to run a script in a specific date like cron in unix but here iam on windows OS )
how to run script automaticlly in spacific date ?
Moderator: General Moderators
-
amira_fcis
- Forum Newbie
- Posts: 16
- Joined: Sun Aug 16, 2009 7:59 am
-
Mark Baker
- Forum Regular
- Posts: 710
- Joined: Thu Oct 30, 2008 6:24 pm
Re: how to run script automaticlly in spacific date ?
Windows has its own equivalent of cron.
It's called "Scheduled Tasks" and con be found on Settings/Control Panel/Scheduled Tasks
It's called "Scheduled Tasks" and con be found on Settings/Control Panel/Scheduled Tasks
-
amira_fcis
- Forum Newbie
- Posts: 16
- Joined: Sun Aug 16, 2009 7:59 am
Re: how to run script automaticlly in spacific date ?
but i need to coded it by php..?..look i want to send a notification to the user before his reservation date by 2 days ...so it is dynamic where i get the date of reservation and subtract 2 days then want to run this script to send the notification...? hope u get me .
thanks in advance
thanks in advance
Re: how to run script automaticlly in spacific date ?
It can't be done in PHP on it's own. PHP only runs when something calls it. Set up Windows Task Scheduler to call a PHP script at a specific time (eg 2AM), then have that script check to see if there are any reservations to send and, if there are, send them.
-
amira_fcis
- Forum Newbie
- Posts: 16
- Joined: Sun Aug 16, 2009 7:59 am
Re: how to run script automaticlly in spacific date ?
thanks onion2k ,
ur idea works great wiz me ....thanks alot
ur idea works great wiz me ....thanks alot