Scheduling Tasks to run in a Yii environment

I have been lucky enough to have been given an opportunity to work with Yii and PHP using a SQL Server backend. I have developed a number of applications with simple workflow and so far so good. I now require to have programs run that read through the records created by the application to send out reminders, update status information etc.
I was wondering if someone could please give me some direction on how I might go about setting this up. The Yii, PHP environment runs on a Windows 2008 server so I am guessing I can use Windows Scheduler - I have never used this before. Is it just a matter of writing an action in the Controller I wish to run and then pointing a Windows Scheduled task to that URL eg http://......./index.php/myapp/myAppsAction?
My search on the Web directed me to running Cron jobs and even that seemed confusing.

Kind regards
Who is Participating?
Ryan ChongCommented:
I checked back my site, it's kind of weird stuff.... the scheduler is calling a .bat file which calling a .vbs file.


CScript C:\Domains\mysite\wwwroot\task.vbs

Open in new window

Call Send_HTTP_Request()
Sub Send_HTTP_Request()
On Error Resume Next
Dim objRequest
Set objRequest = CreateObject("Microsoft.XMLHTTP")
URL = "" "POST", URL , false
Set objRequest = Nothing
End Sub

Open in new window

You may modify from the sample I provided above.
Ryan ChongCommented:
I got some experience (in fact problem) with my hosting website when I try to call a scheduled task to trigger a php page to send out email notifications.

So, the solution for my case is that the scheduled task will be triggered to call an executable instead (like a vbs, exe, batch file etc), and then let that executable to call the php page accordingly. Looks a bit weird but it works for me!
ChrisMinasAuthor Commented:
Thanks for your response Ryan.

Do you have an example of how you wrote the vbs, exe please?


Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.