wellscam Posted October 9, 2008 Share Posted October 9, 2008 I have a SQL Querry that I need to run every 30min. I'm hoping there is a way to have it automatically run on a web page then IF there are results, send me an email. The query was written in Access, so I need to convert it to PHP and see if there is a way to have some sort of scheduled task or something run the page every 30min. Does anyone know how to do this? Here is the query: SELECT AllInfo.IO, AllInfo.CO, AllInfo.DateTime, AllInfo.Extension, AllInfo.Duration, AllInfo.AC, AllInfo.PhN FROM AllInfo WHERE (((AllInfo.IO)="Out") AND ((AllInfo.DateTime)>DateAdd("n",-30,Now())) AND ((CInt([AllInfo].[CO])) Between 1 And 23) AND ((AllInfo.LD)="Y")); Quote Link to comment https://forums.phpfreaks.com/topic/127728-scheduled-tasks/ Share on other sites More sharing options...
refiking Posted October 9, 2008 Share Posted October 9, 2008 Check with your hosting provider. They should have a cron job feature on your control panel. You can usually run it every 15 min, 30 min, hour, week, month, etc. Quote Link to comment https://forums.phpfreaks.com/topic/127728-scheduled-tasks/#findComment-661046 Share on other sites More sharing options...
wellscam Posted October 9, 2008 Author Share Posted October 9, 2008 This is actually hosted locally on one of my server, I'm just very new to all of this. It's on a Windows Server 2003 running IIS 6.0. Quote Link to comment https://forums.phpfreaks.com/topic/127728-scheduled-tasks/#findComment-661187 Share on other sites More sharing options...
wellscam Posted October 9, 2008 Author Share Posted October 9, 2008 So I can create a scheduled task on the server to run the script, but how do I write that kind of page that will do what I want it to? Anyone? Quote Link to comment https://forums.phpfreaks.com/topic/127728-scheduled-tasks/#findComment-661361 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.