Scheduled Task Launches Multiple Times

I have a process set that runs the PO Suggestions process for each company, we have several companies. This had been working fine for months as far as I know. Daylight savings happened, I corrected the scheduled times, and later that evening the issue occurred.

I have deleted the schedule and the process set and recreated them. Launched it later in the evening, seemed to work without error. I set the time on the schedule back to it’s original time, 7PM, and the issue occurred again last night. This brings Epicor to a crawl and then I have to cancel the remaining tasks manually. I noticed it will even run the PO Suggestions process for the same company multiple times.

I have PO Suggestions scheduled at two other times using process sets and both of those work fine. It appears it’s only happening with at this specific time.

Has anyone else experienced something like this? How did you fix it? Any help would be appreciated.

Hi Justin,

How is this scheduled? Are you using UTC time? You may need to do that. I’ve seen this happen and had to change from using our time zone to UTC.

Beth

Hi Beth,

We are using EST time, which hasn’t been a problem in the past and the other two schedules are also set to EST time zone. It could be worth a shot though; I’m assuming you’re referring to the Time Zone on the schedule in System Agent? Or in Site Maintenance? Or both?

I had something similar to this last november when we got on 2022.2

Hi Josh,

Nice! We are actually on 2022.2 ourselves, so might be the same. I’ve recreated the schedule and the process set and restarted the app server entirely after. Problem resurfaced last night after doing that. Do I need to delete the schedule, restart the app server, then recreate the process? What was your resolution?

image

Dot releases for task agent don’t get installed automatically so if you installed task agent with an older version originally that might be what it is. It was a bug.

It did revolve around an issue with the timezone stuff they changed far as I can recall.

1 Like

Awesome, I have a feeling our issue is the same. I’ll check into this and report back later this evening.

Just checked the version we have and we are on Task Agent 4.2.200.0 as well. I’ll try Beths suggestion and see if that helps.

Some of the scheduled tasks worked (3 of them, including MRP just kept repeating every 3 minutes) and some didn’t. We changed them all over to UTC time zone and that worked. This is when scheduling a task, not the actual time zone.

There is a time difference between UTC and EST. I can’t remember how many hours though.

It won’t show the minor . patch you have to just blindly install it.
image

2 Likes

That worked for me. I installed the update as suggested and haven’t had a problem since. Thank you!

3 Likes

Awesome sauce. Super annoying they don’t show the patch version. You would never know that you aren’t running the latest version without explicitly installing it.

2 Likes

If we’re on-prem are we stuck with this? We’re on 2022.1.21. I had this same thing happen except instead of PO Suggestions I was sending out reports to AP all night :upside_down_face:

TL;DR - If you’re stuck with not being able to patch the problem, or worry about it coming up again, you can switch your schedules to UTC by not providing a timezone. This means you have to update some of your schedules twice a year for DST or they’ll be an hour off sometimes.

System agent is a bit of an outlier in how date/time is handled in Epicor. Elsewhere, values are stored as simple datetime with the assumption that they’re at the locale specified in company maintenance or the server’s timezone.

Where system agent goes off the rails is that recurring schedules work statefully - they don’t arrive at the next run time from a fixed reference, instead they iterate next run time on itself. If system agent makes an error when calculating next run time, it’s heritable and errors compound!

It’s really easy for updates that touch system agent code to break how that works, unless the developer takes the time to (successfully) understand the general purpose and context of what they’re working on. Time handling works differently everywhere else, so at a glance this code likely looks inconsistent or wrong.

We are on-prem, I reinstalled the new task agent from the directory mentioned by Joshua earlier in the thread and haven’t had a problem since then. I’d give that a go and see if it helps.

Otherwise, follow Beths advice and change the timezones on your schedules in the system agent to UTC.

1 Like