Scheduled tasks start and end times changing when using Europe/Helsinki timezone

Am I going crazy, or are the Scheduled tasks completely broken on both the latest Lucee 6 release and Lucee 7 RC?

At every server reboot, all or most scheduled tasks randomize their daily start time and end time so that the tasks won’t be executed at all, or only for a few minutes on each day.

Example:

  • Create a scheduled task (in my case five of them), Execution every 10 (or so) minutes (or any number of hours and minutes or seconds) between 00:00:00 and 23:58:50 (or similar) every day.
  • Reboot the Windows Server
  • Most of the tasks show up on a red background now in Lucee Admin, the reason being that the Start Time has magically changed to 23:39:49, and the end time is 23:37:49. Neither of these time stamps match the original start time or end time, which covered the whole day (minus a couple of minutes).
  • Some scheduled tasks randomly get empty end time, and some not.
  • Most or all of the tasks always get a daily start time which is anything from 1 minute to half an hour before midnight.

Tested with the latest Lucee 6 Release. Uninstalled it completely, deleted lucee installation folder, installed the latest Lucee 7 RC, and the same behavior continues.

Windows Server 2022, IIS.

1 Like

hmmm, can’t quite reproduce the problem myself it so far!

Could you share an example scheduledTasks section from your .CFConfig.json?

are these values changing in the CFConfig.json after each restart too?

{
      "name": "test",
      "startDate": "{d '2025-06-17'}",
      "startTime": "{t '00:00:00'}",
      "url": "http://127.0.0.1:9888/task.cfm?scheduled=true",
      "port": 9888,
      "interval": "60",
      "timeout": 50000,
      "resolveUrl": false,
      "publish": false,
      "hidden": false,
      "readonly": false,
      "autoDelete": false,
      "unique": false,
      "paused": false,
      "endTime": "{t '23:58:50'}"
    }

Also try changing the log level for scheduler to TRACE that should provide some more clues (default is ERROR)?

I played around with the admin console, and checked that no matter what I do, the .CFConfig.json always saves the scheduled task so that the start time is 23:39:49, and that’s the earliest time stamp I can have there. However, the admin console shows the start time correctly (i.e. what I last edited it) before I reboot the server, and the scheduling works until reboot.

I just created a new scheduled task (to accompany the 5 existing ones). The .CFConfig.json file got updated with the new task name and details, yet again with 23:39:49 start time (it’s 10:12 AM now. The server clock is correct, synced from Domain Controller). All new and existing tasks have 23:39:49 as their start time (showing 00:00:00 in the web admin, until reboot). If I change the start time to 00:01:00 in the admin console, it gets saved as 23:40:49 in the JSON. So it adds a minute to it 23:39:49.

So, After reboot, the admin console also reads at 23:39:49 (or 23:40:49), and that’s what the scheduler is using after the reboot, so the tasks will run only for 21 minutes in a day. So I have to to edit it again, and it’ll work, with the wrong timestamps still in the json file. …until I reboot, and have to start all over again.

Looking at the TRACE logs; no errors whatsoever. There would be errors (again) after reboot, if I had set the end time of any task earlier than 23:39:49. “Invalid task definition: endtime is before starttime”

{
  "name": "schtsk_newactions",
  "startDate": "{d '2025-06-11'}",
  "startTime": "{t '23:39:49'}",
  "url": "https://[OBFUSCATED_FOR_SHARING].cfm",
  "port": 443,
  "interval": "540",
  "timeout": 50000,
  "resolveUrl": false,
  "publish": false,
  "hidden": false,
  "readonly": false,
  "autoDelete": false,
  "unique": false,
  "paused": false
}

I edited all the start times now manually within the JSON. After reboot (or service restart) the edited values show correctly in the Web Admin.

After this I edited one task start time to be at 00:09:30 AM (9,5 minutes after midnight). The edited task start time was saved in the json again at 23:49:19! So, again Lucee thinks that 23:39:49 is the same as midnight. This is downright bonkers. The other actions I did not edit, were untouched in the JSON, so they will behave correctly after the next service restart or reboot.

What time zone is the server running in?

The server is running on EET(+DST) time zone. (UTC+02:00 Helsinki, Kyiv, Riga, etc.)

ok, we so we are in same timezone (waves from Berlin) and both on windows.

I don’t think timezone was going to be a problem, we’d be seeing an 30m or hour hour difference with the changed times., but ruling out issues step by step!

I’m try to repo with 6.2.2.55-SNAPSHOT currently, which version are you running?

I was running the latest Lucee Release 6.2.1.122 (Apr 28, 2025) in Multimode, as with some previous Lucee versions the REST mappings was seriously bugged and didn’t work in Single Mode. I then switched my Lucee 6 from multimode to single mode.

After a while, I deleted the whole c:\lucee\ folder, and reinstalled Lucee 7 on the same server/IIS. I’m running the Release Candidate 7.0.0.242-RC (May 21, 2025). The same scheduler buggy behaviour has existed throughout, I think.

so with this type of problem, it’s always best to finally try the latest snapshots, in case the problem has already been fixed

So sometimes what is being displayed in the admin, is out of sync with the contents of .CFConfig.json file?

I think I tried the latest Lucee 6 snapshot before moving to Lucee 7.
I can try to create a new machine new start from scratch with Lucee, to see if I can reproduce the bug in another environment. It can be a one-off, but it’s one that I can’t get rid of now on the server I want to run.

As I described, editing/adding a scheduled task always puts start time as 23:39:49 in the JSON file (or adds my starting time to that), while keeping the desired value in the admin console… Until server/service restart, when the admin console also syncs back to wrong times that went to the JSON.

I just tried with a fresh install using the 6.2.2.54-RC installer in windows sandbox and it’s still all working fine for me.

Can you check that when you submit the form in the browser, via dev tools that the correct values are being passed?

this is really odd, as the values are also passed as individual values
and the timestamp is then created using CreateTime()

image


I Captured the POST request, and it shows the correct values are been posted. I set the start time at 00:00:18. Immediately after, the .CFConfig.json shows the start time as:

 "startDate": "{d '2025-06-11'}",
  "startTime": "{t '23:40:07'}",

… which is 18 seconds after the magical 23:39:49.

what do your regional settings look like?

I think we’re onto something. My Settings are as yours, but with Europe/Helsinki timezone. It’s the Helsinki time zone that seems to break things.

I changed to Europe/Berlin time zone, and my scheduled tasks in the web admin switched the start times by one hour. This is probably by design, as the original scheduled time was created on Helsinki timezone.

  • Switch to Berlin timezone → Create or edit a task with start time 00:00:18. → The JSON works perfectly! 00:00:18 gets written to json as 00:00:18. (Lucee says the time in its context is now 15:18 (at 16:18 Finnish time, this is correct).
  • Switch to Helsinki timezone → Create or edit a task with a start time of 00:00:22 → The JSON is buggy again, and start time is set to 23:39:49 + 22 seconds. (23:40:11). (Lucee says the time in its context is now 16:18 (at 16:18 Finnish time, this is also correct).

great, now we can repo, I have filed a bug

https://luceeserver.atlassian.net/browse/LDEV-5650

<cfscript>
setTimeZone("Europe/Helsinki");
dump(datetimeformat(createTime(23,39,49),"iso")); // 1899-12-30T23:19:38+01:39

setTimeZone("Europe/Berlin");
dump(datetimeformat(createTime(23,39,49),"iso"));  // 1899-12-30T23:39:49+01:00
</cfscript>

On 30 April 1921 at midnight on Walpurgis Night the official time was advanced 20 minutes and 10.9 seconds to Eastern European Time, to become the standard time zone for the country - Time in Finland - Wikipedia

which as time is currently based on 1899, causes this problem!

1 Like

@Fernis can you try the 6.2.2.57-SNAPSHOT