Scheduled tasks - Endtime before Starttime issue


#1

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?


#2

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?


#3

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.


#4

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


#5

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


#6

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


#7

Thank you for looking at the source!

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


#8

I think I found it:

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


#9

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

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