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.