How can I start tasks using Curl.exe?

Modified on Fri, 30 Aug at 2:10 PM

FIRST CREATED ON 1 Jun 2023  I  AUTHOR Emma Camacho


Starting tasks using Curl.exe provides a simple and flexible way to automate actions via the command line. Here's a quick guide on how to initiate tasks with Curl.exe.



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 Mail & Deploy 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 been 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





Looking for Additional Guidance?


If you require more detailed information or further assistance, please visit our comprehensive Online Documentation. Our resources are designed to help you navigate all features and functionalities effectively.


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 at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article