Developer forum

Forum » Integration » Yellow flags on Scheduled tasks

Yellow flags on Scheduled tasks

Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,

We have a project where we see very often (every day) that scheduled tasks are marked with a yellow warning.

We have looked in the logs but we cannot find an obvious reason for these flags. We have assumed some tasks are overlapping and we have adjusted the ones that are running multiple times a day but we cannot get rid of those flags.

Can anybody suggest a reason for these flags and maybe a solution? or a direction to investigate further?

Thank you,
Adrian


Replies

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Adrian,
the yellow warning means that the task was not run as it should. The warning is shown when this task "next run" time is in the past while it should be in the future,
so probably the task was not run at the time when it should in the past and its "next run" was not updated and that is why the warning is shown.
You can check the ScheduledTask table column "TaskNextRun"
BR, Dmitrij

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Dmitrij,

Thank you for the details.

The question now is how do I prevent this from happening?

Could there be one faulty task that prevents the others from running correctly?

Thank you,
Adrian

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Adrian,
maybe you can check the scheduled task logs in the System\Log\ScheduledTasks\2022-12-06.log file (or similar to that file name)
It can happen when there is a thread abort exception during one of the task execution then the message:
"Task 'xyz' caused a thread abortion" is witten to log and others tasks are not executed.
Or maybe you have an option "Run if previous task executed successfully" ON and previous task fails then the next tasks are not executed as well.

So try to look more in the logs and maybe you will find some error messages saying of what happened.
There should also be a folder System\Log\ScheduledTasks\Errors\2022\12\ that is worth to look into its logs files too.

BR, Dmitrij

 
Scott Forsyth Dynamicweb Employee
Scott Forsyth
Reply

Another situation that is fairly common is if some tasks take more than 5 minutes to run. That can cause the next scheduled run to be delayed, causing other scheduld tasks on a 5 minute schedule to be delayed. That gives the yellow warning. 

As long as they are running successfully on the next run, then it's ok to ignore the warnings. That warning is benign in that situation, and just a bit annoying, but ok to ignore. Another option is to change the frequency or start times of the tasks so that they don't cause each other delays.

Scott 

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Scott,

Thank you very much for the details.

I have tried a few scenarios and I have adjusted the frequency of the runs but wothout any luck. And yes, in our case, most of the jobs take more than 5 minutes to run.

The log, however, as you also mentioned, report the job as being run successfully. But we sometimes see some indications that this reporting may be innacurate. Mostly when it comes to Secondary Users and Assortments.

We'll try to tweak it a bit more and see what happens.

Thank you very much,
Adrian

 
Scott Forsyth Dynamicweb Employee
Scott Forsyth
Reply

Hi Adrian,

I'm curious what you find. Another way to tell is if you take note of the next run time vs. the actual time. If the next run time is a few minutes in the past, then it's normal for that to turn yellow. Since you mention that most jobs take more than 5 minutes to run, it sounds likely that this is the issue that you're running into. Personally, I've just gotten used to ignoring the yellows since we also often have tasks that take longer than 5 minutes to run.

Scott

 

You must be logged in to post in the forum