I think you are not quite grasping the way to use cfschedule...basically it is a programmatic replacement for using cfadmin
(although you can use the "run" attribute to actually run a scheduled item
think of it this way. You use cfschedule to -create- (or modify) your scheduled task. It's your task itself that should be doing the logic
what I would do is create the task in cfadmin or using cfschedule which points to the file
task.cfm
<cfset storedDate = "10/28/2009"> <!--- test value only --->
<cfif datediff("d",storedDate,no
do something
<cfelse>
wait till next scheduled task and check again
</cfif>
this way you keep your logic in the task itself
Main Topics
Browse All Topics





by: myselfrandhawaPosted on 2009-10-30 at 06:04:15ID: 25702491
Okay! i expect you are on a shared host. Go to shared Host Control panel. Choose schedular write the name of the file you would like to run after every 30 minutes.
ate')>
Now create a file like this:
<cfif DateDiff('m',now(),'startd
Error
</cfif>