Scheduled Task Start Time

I have been using ColdFusion since the 20th century and I thought I understood how it worked pretty well by now. I am not sure how this one slipped by me.

[More]

Related Blog Entries

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
It was always my understanding that the start time applied to every iteration of the task (i.e. if hourly and start time of 11a, it would run from 11a to the end time time (or the end of the day, if no end time was specified) every day. If weekly task and start time of 11a, it would run once a week at 11a). I just confirmed this in the logs for our CF7 servers, and our hourly tasks that are scheduled to run from 11a-4p run at 11, 12, 1, 2, 3, and 4. Is it possible that the start time for the task was changed at some point?
# Posted By Rich Rein | 1/24/08 10:39 AM
Rich,

That certainly appears to be the case - I'm not sure how I got myself all mixed up about it.
# Posted By Steve Bryant | 1/24/08 10:44 AM
So this would mean that your task would only execute if the 'HOUR' was currently 3 right - (greater than or equal to 3 and less than 4).

So your Scheduler is set to 'hourly', then this should only execute on the 3rd hour - assuming 1x a day then right? (as a time of 3 pm returns 15 as the hour)

So yes, I could see, setting up a Scheduler for 11 am would not work - even though, the next day - hourly, a person would think that the task would roll to the next hour in the morning etc.

The key here is to look at the scheduler log - and look for the 'Rescheduling for' value - as when a scheduled event ends - it should setup the next schedule for you. (make sure you log scheduled tasks etc - cfadmin Debugging and Settings - Logging Settings Enable logging for scheduled tasks)

I'm currently in a thread on the yahoo 'coldferusion' group about a scheduled task issue I'm seeing and is repeatable regarding long running threads, if interested http://tech.groups.yahoo.com/group/colderfusion.
# Posted By Kevin Penny | 1/28/08 12:58 PM
Kevin,

That is correct. Certainly, I could have just set up a daily scheduled task to run at 3:00 AM for the same effect.

I avoided doing so only because I have one file on this site through which I manage all scheduled tasks - keeps me from having to clutter up the admin with a bunch of scheduled tasks some of which have rather complicated logic for determining the timing.

Good advice about looking at the scheduler logs - I certainly should have done that.
# Posted By Steve Bryant | 1/29/08 2:00 PM
BlogCFC was created by Raymond Camden. This blog is running version 5.8.001.