It is not stated in the description of the tag that the startTime and endTime parameters always refer to the time the task starts and runs on each and every day of the defined schedule period. This is perhaps unnecessary for interval values of 'daily', 'weekly' and 'monthly' but it is not at all obvious, or even to be suspected, for intervals of less than a day expressed as a number of seconds. On the basis of the information provided, you would expect that a task set to run every five minutes starting a 09:00:00 today (or any other time) would run every five minutes thereafter until the endDate and endTime, or forever if these were not specified.
Also, if the endTime is not specified, the scheduled task does not stop at the end of each day, but after the first time the task runs in the following day. For example, a task with a startTime of 15:59:59 and an interval of 14,400 seconds (4 hours) will run at 19:59:59, at 23:59:59 and again at 03:59:59 the next day before stopping to wait for 15:59:59 to roll around again. While this may be of little importance in many cases, it in fact caused me some grief. In any event, the functionality should be known and specified in detail, not left to the user to discover by trial and error.
With respect to CFSCHEDULE, if one wants to set an interval of recurrence other than the offered "daily, weekly, or monthly" options, there is a way to go that (for CF9, at least, not for CF10), though it's not documented. You can use the tag's INTERVAL attribute to specify pretty much any recurrence timeframe, at least in seconds.
For instance,to setup a bi-weekly interval, you just need to set the number of seconds appropriately: 1209600 (24*60*60*14). When viewed in the CF 9 Admin, you'll also see this populated in the "daily every" field as a value of equivalent hours: 336 (24*14). The value for bimonthly is 5184000 (1440 hours in the Admin), while the value for quarterly is 7776000 (2160 hours in the Admin).
Sadly, values beyond a single day (24 hours) are not accepted in the admin interface, so while you can create such larger value with the tag, and it will appear in the Admin, this limitation does mean that you will not be able to edit a task created this way.
Also, as of CF10, you can't even specify the INTERVAL in the tag to be greater than a day (in seconds). Instead, you will need to use the new crontime attribute in the tag, or crontime field in the interface.
Message was edited by: Charlie Arehart Updated to clarify that while the tag lets you create an interval longer than a day (in CF9), and it shows in the Admin interface, you cannot then edit the task.
In my opinion, cfschedule's settings are more fine-grained than you have suggested. You mention the start-time and end-time, but omit the start-date and end-date. You may set the start-date to a value in the past to get the job to start earlier. You may also use action="run" to execute a task immediately, followed by action="update" to get the task to recur.
However, I agree with you that here, as almost everywhere else, the documentation needs to be improved.
More fine-grained? I don’t quite understand. I mean, yes, I agree that the settings can be. But I don’t quite see how that comment applies to what I was sharing.
I was just observing how one can set a recurring task at other than daily, weekly, or monthly intervals. Are you referring, then, to another means to solve that specific problem? Or are you making a comment on CFSCHEDULE in general? I was not meaning to address that at all in my comment. Hope that’s helpful.
(Let’s do remember, also, that these are comments on the tag, not really a discussion forum. It’s such a shame, I think, that somehow they end up showing up in one of the Adobe discussion forums, which could be misleading, as they then do also show up in the comment area for the tag. I’m not so much trying to squelch conversation as just making the observation about the nature of these particular doc comment threads.)
Ah, ok. Thanks for that clarification. If you may wonder “how I missed that”, it turns out that when we get these forum thread messages by email (as I do), I notice now that it does not indicate who a message is in reply to (whereas it does that in the forum interface). Since mine was the last message in that thread, I just reasonably assumed you were talking to me. No offense meant, or taken.