Scheduled tasks - Endtime before Starttime issue

Hi

When I want to add a scheduled task to Lucee 4.5.1 and execute it lets say
every 3 minutes between 18:00/6pm and 06:00/6am the next day.

I though you would enter it like the screenshot.
No error message in the interface when saving the page.
However looking in the scheduler.log I have

"ERROR","Thread-94781","03/10/2016","20:00:01","schedule 
task:[TASKNAME]","This task can not be executed because the task definition 
is invalid; endtime is before starttime"

Has anyone else experienced this?
Is there a fix for this?

Seems like it should work as-is but what if you broke it into two scheduled
tasks. One for 18:00-23:59 for 10-3-16 and one for 00:00-06:00 on 11-3-16?

Hi Scott,

Yes, I ended up creating two scheduled tasks, one before midnight and one
after.
With that said I still think this is somewhat broken.

I would expect that if you provide an end-date and end-time it should be
respected.
Right now it seems that Lucee only listens to end-time, that is why it
regards 06 as before 20 in my example.

Can someone from the core team comment on this, please.

David,

I’d encourage you to file a bug report for this as the best way to get
someone from the Lucee dev team to look at this. It’s almost certainly a
bug …

Aria Media Sagl

I tried same day range and I get this (see screenshot) and I keep getting these errors in red.

looking at the source code, those red message are always displayed.

the problem is the Lucee only checks the times without taking the dates into consideration

Also the schedule task edit form doesn’t go back to the scheduled task list which is a bit confusing.

there is an existing bug, please vote for it

Scheduled tasks - End time before Start time issue
https://luceeserver.atlassian.net/browse/LDEV-782

1 Like

Thank you for looking at the source!

Uggh what a mess. Where do I check if the task has been added?

I think I found it:

/public_html/WEB-INF/lucee/scheduler/scheduler.xml

Also, you can run this in the same web context as the scheduled task definition.

schedule action="list" returnVariable="result";
dump( result );