Link to home
Start Free TrialLog in
Avatar of 451ls
451ls

asked on

cfschedule for intervals of 2 weeks

Anyone know of how to use cfschedule to launch a task on an interval of every 2 weeks. The cfschedule tag only lists daily, weekly, monthly and x seconds. I've tried using 1209600 seconds but am suspicious that this will not work - hoping to find out before 2 weeks.

It's important I resolve how to do this before 2 weeks anyway - for a client.

My application infrastructure for scheduling tasks is all built around sending the interval to the CF scheduler, so I'm not looking for a completely manual scheduler - I want a solution to using CFSCHEDULE.

ASKER CERTIFIED SOLUTION
Avatar of Zyloch
Zyloch
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hello 451Ls,
Well once our client wanted to do similar kind of task every other day.
What we did was that we ran the cfschedul every day but we put the condition over the task that
<cfif today is even day>
do this
<cfelseif today is odd>
just do not hing
</cfif>

Regards,
---Pinal
Avatar of 451ls
451ls

ASKER

Good suggestion, Zyloch - hadn't thought of changing the clock. I did and amazingly it worked. I guess this confirms that the CF Admin interface arbitrarily imposes the restriction on numbers of seconds greater than a day.

Documentation is very poor here and there is no indication of the maximum number of seconds allowed.

I could have written special logic as Pinal suggests, but this would have been ugly since I would have to calculate whether the start week was odd or even and then ignore doing anything if my week (upon executing) was the opposite.