141
Views
2
Comments
Activate timer after deploy to production.
Question

A Timer activate a action by a certain time schedule. But I want to activate a action immediately after deployment to production. Is this possible? 

I know their exist an occurrence "When Published". But I think this is not the same as 'after deployment to production'. 

2019-06-15 21-39-22
Afonso Carvalho
 
MVP

Hello Danny,

I don't think there's anything out-of-the-box to do what you're looking for, but you should be able to construct something with the LifeTime API (examples here). You could keep track of your last deployment date to production, and then do a GET /deployments/ or /applications/ and compare dates to see if a deploy has been done in the meantime. Then you could have a Wake Timer action exposed on a REST API and call that.

2024-07-05 14-16-55
Daniël Kuhlmann
 
MVP

Hi Danny,

You can use the When Published, in combination with a site property, call it something like Versionx.xOnPublishTimerDidRun and set the default value to false.

In all environments where you don't want to run the timer, set it on deployment to true.

In the Action attached to the timer check that the site property is false, and only then execute the logic, after that set the site property on True.

Regards,

Daniel

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.