• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Problem with CFSchedule

New Here ,
Feb 19, 2009 Feb 19, 2009

Copy link to clipboard

Copied

I have a script that I'm trying to insert into the CF Scheduler that will run from the time its submitted (via <cfschedule> tag) for 6 hours.

The script I have works great if you start at least 6.5 hours prior to midnight (ie you start it at 1pm, it will run till 7pm and shut off). But if you start it at 6:01pm or later it almost appears as if the <cfschedule> tag is completely ignoring the date information passed to it and gives me an error.

The code is included.

Here's the results of some cfoutputs:
SchStart: {ts '2009-02-19 22:42:29'}
SchEnd: {ts '2009-02-20 04:42:14'}
SchStartDate: 02-19-2009
SchStartTime: 22:42
SchEndDate: 02-20-2009
SchEndTime: 04:42

And here's the error I get:
Invalid parameters have been passed to the scheduling service. Parameter {ts '1899-12-30 22:42:00'} should be earlier than parameter {ts '1899-12-30 04:42:00'}.

I've tried EVERY date format mask that CF allows, and every time it converts the time correctly but ignores the date and tries to insert the 1899 date. Even with the cfoutputs showing that the dates are there and formatted correctly.

Please help!
TOPICS
Advanced techniques

Views

557

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 20, 2009 Feb 20, 2009

Copy link to clipboard

Copied

The short answer is that when this script is run after 6 pm, the SchEnd becomes a date for the following day with a time earlier than the starttime (SchStart) . Since this is a daily task, it cannot span multiple days nor can it have an end time earlier than the start time.

If you were to make sure that the enddate was the same as the startdate and that the end time was no more than 23:59, it will work.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 23, 2009 Feb 23, 2009

Copy link to clipboard

Copied

LATEST
So I guess it doesn't look at the combination of the date and time to see if its a valid date in the future, just once piece at a time. Kinda odd that they wouldn't incorporate something like that from the get go.

Thanks for the input, I'll have to tweak my code a bit to make sure it never spans a second day, but it shouldn't be a problem.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation