Start tasks using Curl.exe

Modified on Tue, 13 Jun 2023 at 02:24 PM

To start a Task using CURL.EXE, use the following command


CURL.EXE -d "" -H "MailAndDeployAccessKey:<access_key>" "<URL>"


<access_key>

How to get an API Access Key : Portal (mail-and-deploy.com)


<URL>

http(s)://<host>:<port>/API?Method=ExecuteTaskAsync&TaskId=<task_id>&Delay=<delay>


ParameterDescription
<host>is the name of the machine on which Mail & Deploy is running
<port>is the port on which Mail & Deploy is listening (make sure it’s not blocked by the firewall!)
ExecuteTaskAsyncInstructs Mail & Deploy to execute a task and immediately return from the API call (i.e. the call will not wait until the task execution has finished!)
<task_id>The ID of the Mail & Deploy task to be executed (in GUID format; i.e. 073da867-be56-4ba5-a095-7d8e14bc99c3)
In M&D Management Console, open the task to be executed and copy the following GUID:
<delay>An optional delay in seconds; very important! 
This is particularly useful if you want to make sure that the task accesses the correct version of the app; when a load script has completed, it may take a few seconds for Qlik Sense to commit the changes of the app to the database. When Mail & Deploy starts the task execution too fast, it may access the old version of the app rather than the new one. By delaying the execution (e.g. say by 60 seconds, depending on the app size) you can ensure that Qlik Sense has finished saving all app changes before the task execution starts.


Examples


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article