CRON-like scenario triggers

Solved!
simonkth
Level 1
CRON-like scenario triggers

Hello,

I have a scenario with a trigger every 5 minutes:Screenshot from 2021-08-12 19-02-08.png

As you can see I have no control over the initial timestamp, so instead of running roughly at 18:55:00 it ran at 18:56:51.

What would be the easiest way to have a CRON-like trigger, like 5 * * * * would do?

0 Kudos
2 Solutions
adamnieto

Hi @simonkth , 

If you are looking for some more control over when it executes. I would recommend using a python based trigger for the scenario  to help solve this problem. 

Here is some helpful documentation: 

https://doc.dataiku.com/dss/latest/python-api/scenarios.html

Perhaps the python based trigger can calculate the times it is suppose to run for that day and execute the scenario when it determines the current time is that 5 minute time mark. 

Hope this helps!

View solution in original post

Marlan

Hi @simonkth,

If you do pursue a python custom trigger as @adamnieto suggests, here are a few tips  on python triggers.

Marlan

View solution in original post

3 Replies
adamnieto

Hi @simonkth , 

If you are looking for some more control over when it executes. I would recommend using a python based trigger for the scenario  to help solve this problem. 

Here is some helpful documentation: 

https://doc.dataiku.com/dss/latest/python-api/scenarios.html

Perhaps the python based trigger can calculate the times it is suppose to run for that day and execute the scenario when it determines the current time is that 5 minute time mark. 

Hope this helps!

Marlan

Hi @simonkth,

If you do pursue a python custom trigger as @adamnieto suggests, here are a few tips  on python triggers.

Marlan

apichery
Dataiker

Alternatively, you can specify the exact time starting with a granularity of 1 hour. So to have a scenario triggered exactly every 5 min at 0'clock, 5, 10, ... you can create 12 1-hour triggers 

Screen Shot 2021-12-07 at 4.45.55 PM.png

โ€ƒ

0 Kudos