Expand my Community achievements bar.

SOLVED

Scheduler activity technical implementation

Avatar

Level 2

What is the technical background of Scheduler activity? I'm asking because we had scheduler set for example 3pm daily, and a maintenance break took place from 2pm to 9pm (like build upgrade where nlserver services were stopped).

I would have expected that the scheduler would not fire when the services were started 9pm, but it did. So is there some queue stored somewhere which continued processing? Is there a way to prevent delayed run of schedulers (other than stopping the workflow)?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hello @terol73355739 ,

it seems you need to make your own workaround. What comes to my mind is to create simple check after sheduler to check if it's 3pm and if not simple will stop workflow and scheduler will fire next time. 

As an possible workaround for the problem:

Marcel_Szimonisz_0-1680634370798.png

 

Marcel

View solution in original post

7 Replies

Avatar

Level 10

Perhaps you can use the expiration feature in your Scheduler to delay execution during your chosen date.

 

David__Garcia_0-1680604778542.png

 

Avatar

Level 2

Well, actually what I would want is that the scheduled run is just skipped if the services are down 3pm, and run next time next day 3pm. And if we have 100 scheduled workflows of course we would not like to manipulate those manually 

Avatar

Level 10

Hi @terol73355739 there is no ootb functionality to prevent this globally, although it sounds like a good enhacement to implement, perhaps you can raise it as a feature request. https://experienceleaguecommunities.adobe.com/t5/adobe-campaign-classic-ideas/idb-p/adobe-campaign-c... as a new workflow option where you can configure a flag to disable it from running if scheduled execution is missed.

 

On the other hand, as part of the the upgrade prep procedures, taking a snapshot and saving the list of all running workflows is a must, and usually some clients take a snapshot then proceed to stop said workflows and manually start them after maintenance/upgrade.

 

 

Avatar

Correct answer by
Community Advisor

Hello @terol73355739 ,

it seems you need to make your own workaround. What comes to my mind is to create simple check after sheduler to check if it's 3pm and if not simple will stop workflow and scheduler will fire next time. 

As an possible workaround for the problem:

Marcel_Szimonisz_0-1680634370798.png

 

Marcel

Avatar

Level 2

Yes, thank you, that's a possible solution. But a bit troublesome to do because of maintenance breaks occurring maybe twice a year  

But still I would like to know how the scheduler is technically implemented, any deeper knowledge about that? (Cron based should not fire for example?)

Avatar

Community Advisor

Hello @terol73355739 ,

i have checked my local instance, scheduled worklfow and shut down the server. Indeed it will process the workflow even after the scheduler date is already in the past.


It looks to me it works followingly:
The workflow server process (wfserver) looks (somehow its black box to us) to  xtkworkflowjob table, you can see it also from the rich client under the shemas - xtk:workflowJob. The "process" checks the column tsnextprocessing (Nex processing) and if the timestamp in here is less or equal to the column tsprocess (this is in console under xtk:workflow workflow/@process) the workflow will trigger. Ofcource the workflow has to be in state started.

Marcel_Szimonisz_1-1680681389615.png

 

So you either

  • create script to stop all started worklfow with daily scheduler (you can hardcode the list or query from table workflow to look for workflows with sheduler ) stop them then save them to the list and after the patch is done you can reference the list in another technical workflow that will start them again
  • add  test activity to check if-it's-the-time i should run condition to each scheduled workflow

 

 

 

Avatar

Level 2

Because we had so many workflows that were scheduled for the maintenance break, we chose a bit different approach. With a filter (had to use some memoContains conditions because the time settings are not visible in selectable fields) we could show the workflows in question and just stop them. Next day it was easy to find the stopped ones and start again.