- Create and modify tasks
- Task Management and Scheduler
Create and modify tasks
Creating a task is simple, just go to the tasks section in the left "hamburger" menu, and click on "+ create New Task", select the task category from Outgoing Webhook/HTTP Request and Script and start writing your task. A task can be modified directly from the tasks' panel in the Dashboard or you can go to the tasks page in the left menu, and click the edit button over the task row.
You can also create tasks from the dashboard by clicking on the "+" button:
Approval tasks handle approval requests in workflows. As breakpoints do, an approval task will pause the workflow execution until it is approved or rejected. Many approvers can be selected, only one approval is needed to continue workflow actions.
An input task is a special task commonly used to start workflows. When executed, the input parameters will be submitted directly to the next chained task in the workflow.
Use the quick input mode or click on "advanced options" for further features.
- Copy Task: select an already created task as template
- Name: name your task
- Host: select the host where the script will run
- Script: select the script to be executed by the task
- Run As: write down any extra command needed for user impersonification
- More Info: describe your task. What does it do, what's the expected output after execution
- Tags: tag your task so you can find quickly through the application.
- ACL's: select who can view your task (what can be done with the task depends on the user role)
- Trigger on (Triggered by): If the task is part of a workflow, select what triggers the task. The task will be triggered by the resource you selected here.
- Grace Time: enter the time period TheEye should wait before running the task. No wait / Cancelation can be selected which means the task will run inmediately after triggered. (only applicable for triggered tasks). To cancel the task execution during the grace period, go to tasks panel, expand the task and delete the schedule created by the trigger.
- Script Arguments: If the script played by the task is meant to receive parameters you can set them from here. Mind the order as it will be used by the script. Fixed, options, and input arguments are allowed. Input and options arguments will be asked to the user for execution. Fixed arguments will not be displayed to the user at execution time.
Outgoing Webhook/HTTP Request Task.
Select Outgoing Webhook/HTTP Request on "+ create New Task" dialog to create tasks based on HTTP requests.
The main difference between a Script task relies on:
- URL: This is the endpoint URL for the request. If GET or POST method is used, the querystring must be provided (E.g. https://www.mysite.com?foo=foo&bar=bar)
- Method: HTTP method (GET, POST, PUT, DELETE, etc)
- JSON Body: Only JSON data is accepted as a request body, if checked, the next Request Body field will be used.
- Request Body: Provide the JSON data to be used as the request body.
- Use HTTP Compression: HTTP Compression flag.
- Req. Timeout: The time to wait for response before considering the request has failed.
- Success Status Code: The HTTP code expected at response to consider it successful. Ref. https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
- Success Pattern: Expected HTTP body response. You can write plain HTML code or you can use a Regular Expression.
Schedule a task.
You can use the task scheduler to create and manage tasks that TheEye will carry out automatically at the times you specify. To view or perform an operation, go to the Tasks section and click on the scheduler icon.
Or Just schedule it from the Dasboard as shown here below
Your new schedule will be shown when the task row is expanded:
Export and Import Tasks
Inside TheEye community you will hear that other people had already solved or automated typical common problems using the platform. When this automation was performed by a task, you will be able to import the solution or on the other hand export and share the tasks you have created.
To export a task recipe, go to the task, click on the context menu, and then click on the "export recipe" icon as shown here: