โ07-10-2019 05:23 PM
Hi all,
I currently run an integration manually by keying in a date as a query parameter, then running it again, manually every two weeks (every 14 days).
Iโm looking for some example code that would enable me to automate this process.
I think I would probably have to run the pipeline manually the first time on the given date, then change the code to use something like โcurrent_date + 14โ.
Does this make sense?
Hereโs how date parameters is currently setup:
โ07-10-2019 05:52 PM
Any reason you couldnโt do this with a scheduled task set to run every 2 weeks if your dates were Date.now?
โ07-11-2019 01:18 PM
Forgive me if this is too messy, BUTโฆ
Date.parse($Today).plusMonths(1).toLocaleDateTimeString(โ{โformatโ:โyyyy-MM-ddโ}โ)
Anyway, this determines the value for the date, adds one month, and then formats it. There are a number of similar ways to do this.
โ07-11-2019 01:30 PM
Thank you for the follow up.
I think Iโm going to go with the first solution involving โDate.nowโ and just schedule a run every two weeks.
Thank you all for your suggestions.