Is it possible to run a workflow every 5 minutes but only between 9am and 9pm my local time?

This topic was automatically generated from Slack. You can find the original thread here.

make give live : is it possible to run a workflow every 5 minutes but only between 9am and 9pm my local time?

Dylan Sather (Pipedream) : try to copy this workflow and just set your timezone in the trigger section

Dylan Sather (Pipedream) : essentially you can use the cron expression **/5 9-20 ** ** **

make give live : Thanks . Is it possible to add the timezone in the cron expression (**/5 9-20 ** ** **) rather than the trigger?

Also, is it possible to create a custom version of the new /modified airtable source and hardcode the baseid and tableid?

If so, I’d like to use the chron as the trigger step and then a modified version of the ‘new /modified airtable’ source as my next step.

In essence, rather than the baseiid and tableid coming from the props panel, it’s hardcoded

Dylan Sather (Pipedream) : is there a specific reason you need to define the timezone in the cron expression itself?

And just to confirm, do you want to run the Airtable source that you were originally running on this schedule, before you setup the Slack source?

Once you select the values of the props for the Airtable source, they are essentially hardcoded for that specific source. Is there a reason you want to harcode them in code vs. selecting them from the UI?

Sorry for all the questions. I’m trying to understand the core of what you’re trying to do because we’ll need to setup something slightly different for you - for example you won’t want to setup a cron schedule to run the source, you’ll just want to change the schedule of the source itself to use this modified cron schedule, and choose that as your workflow trigger.

make give live : Hey

make give live : Thanks for the reply, I gave up on the slack message approach as in testing, there were a number of messages / updates being skipped which wasn’t ideal :slightly_smiling_face:

Dylan Sather (Pipedream) : Interesting, did Airtable specifically not send updates for those records?

make give live : so I’ve now reverted to the new / modified airtable source. Ideally, I’d like to customize this code so it essentially loops through all my 12 bases at a set interval (chron job) rather than me having to duplicate the sources 12 times.

make give live : yep - they were skipped I think because of bulk editing, maybe when a cut and paste took palce

make give live : place

Dylan Sather (Pipedream) : I gotcha, that makes sense. In your source’s Configuration tab, you’ll see the code for that source. You can edit that in any way you’d like. You’ll want to specifically take a look at the run method the source - that’s the code that runs every time the source is invoked.

Dylan Sather (Pipedream) : You can set the same cron expression you used in the workflow for this source, as well, but in event sources there’s not currently a way to specify the timezone, so you’ll need to do the adjustment. By default, cron expressions are tied to UTC.