Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have an API that contains query parameters for startdate. I want to run this job at the end of the month every time. I don't want to manually pass the value in the URL to set the current date. How to do this?
The URL image is attached where it can be seen that I am giving the date and time in STARTDATE='2021-06-30 23:59:59'
First, I want to know how to set context variables to just store STARTDATE. I can store the whole URL in one variable but I just want to store STARTDATE.
The job picture I have also attached.
I don't want to hardcode this flow or else manually I need to change the date every month which does not sound good if I want to schedule this job for every month at a particular date.
It would be great if someone can help me with this.
Regards,
Sheetal
What about the url constructing with java code:
"where=STARTDATE>='" + context.startdate + "'&return..."
Or you can use string replacement:
"where=STARTDATE>='{context.startdate}'&return... ".replace("{context.startdate}", context.startdate)
(I have shortened the URL)