Setting a task start time in the Qlik Sense QMC can only be done down to the level of hour and minute, not seconds. Some customers need to be able to set the seconds because of frequently running reloads.
The Seconds level precision is not something that can be input via the QMC. So the startDate may not exactly align.
This article will not detail how to connect to to QRS as this can be found through our help page: http://help.qlik.com/en-US/sense-developer/November2017/Subsystems/RepositoryServiceAPI/Content/RepositoryServiceAPI/RepositoryServiceAPI-Getting-Started.htm
We can make this change using 3 requests:
1) GET https://<ServerName>:4242/qrs/schemaevent/full?xrfkey=ichbineinberlinR (port depends on how you are connecting and the xrfkey is an arbitrary 16 characters)
This will give us a JSON response containing all the tasks that we have. Our goal here is to find the ID that corresponds with the Task we are trying to change.
2) GET https://<ServerName>:4242/qrs/schemaevent/3c8a02ae-32c2-42b4-8c85-fc3e6fca71cf?xrfkey=ichbineinberlinR (replace full with the ID of the Task being modified)
This will give us a JSON response with just the fields related to the task we are modifying.
3) Copy this JSON Response and we need to make some changes to 3 different fields.
A. "modifiedDate": This appears near the top of the response, all we have to do with this field is make sure the time is newer than the current value
E.G "modifiedDate": "2017-12-20T20:11:24.272Z" > "modifiedDate": "2017-12-20T20:11:25.272Z"
B. "startDate": This is the most important field to change as this is what impacts the future reloads. It appears shortly after modifiedDate . The Task will use this Start Date to define the future occurring reloads. This is where we will fix the task to not have a seconds delay.
E.G "startDate": "2017-12-14T11:10:30" > "startDate": "2017-12-14T11:10:00"
C. "nextExecution": This occurs twice within the JSON markup (once near the top and once near the bottom). The important rule to follow with the nextExecution time is that it has to be a valid time within the schema. So if the startDate was at 12:00:00 and the task reloads every 5 min, then you couldn't for example use 12:06:00. The time would have to be 12:05:00 or 12:10:00 or 12:15:00 and etc.
E.G "nextExecution": "2018-01-08T20:55:30Z" > "nextExecution": "2018-01-08T20:55:00Z" (just make sure to make these the same in both instances of "nextExecution")
4) We need to take this modified JSON and add it to the Body of a PUT request using the same URL as step 2 (Where we narrowed down to just the Task that is being changed)
+ our modifed Body JSON
5) If everything was performed correctly, you will get a 200 OK response. You can also confirm by checking the "nextExecution" time after running the
call again. It should show the modified time.
Tips: Depending on how often the Task reloads, this is your time frame for making these changes. So it it reloads every 5 min, I would recommend starting this process right after the task reloads so that you have enough time to make these changes.