Skip to main content

HelloID

Add, edit, or remove a scheduled task
Add a scheduled task
  1. Go to Automation > Tasks.

  2. Click Create Task.

  3. In the Task catalog dialog box, search for the pre-defined task that you want to create.

    For this example, we'll add the Create folder task.

    2022-06-09_12-34-32.png
  4. Optional: Change the task's default Name.

    For this example, we'll use Scheduled task: Create folder.

  5. Optional: Specify the Agent Pool which will run the scheduled task. See Agent pools.

    2022-07-12_13-21-54.jpg
  6. Go to the Task tab.

  7. Enter the required input values for the task.

    2022-06-09_12-36-36.png

    Tip

    Type {{ in a text field to activate autocomplete.

    You have access to System variables (under {{portal.}}) and Custom variables (under {{variable.}}).

    2023-08-11_12-30-23.jpg
  8. Go to the Settings tab.

    1. Optional: Configure email notifications.

  9. Go to the Schedules tab.

  10. Click Add Schedule.

    2022-07-12_13-27-02.jpg
    1. Enter a Name for the schedule.

      For this example, Scheduled task: Create folder - Nightly.

    2. Configure the schedule as desired.

  11. Click Save.

The scheduled task has been added, and is now listed in Automation > Tasks.

2022-07-12_13-22-48.jpg

It will automatically run on the specific schedule. To manually run it, Manually run a scheduled task. To view its run history, View task run history.

Tip

The Tools4ever GitHub account contains a variety of PowerShell scheduled tasks that you can import into your HelloID environment. See Service Automation GitHub resources.

  1. Go to Automation > Tasks.

  2. Click Create Task.

  3. In the Task catalog dialog box, click PowerShell in the left-hand column, and then click Add for Custom PowerShell Script.

    2022-06-09_13-17-45.png
  4. Optional: Change the task's default Name.

    For this example, we'll use Scheduled task: Weather report.

  5. Optional: Specify the Agent Pool which will run the scheduled task. See Agent pools.

    2022-07-12_13-48-19.jpg
  6. Go to the Task tab.

  7. Disable the Use Template toggle.

  8. Enter your code in the PowerShell Script field.

    For this example:

    $temperatureUnit = "fahrenheit"
    $locationEndpoint = "https://api.open-meteo.com/v1/forecast?latitude=40.71&longitude=-74.01&hourly=temperature_2m&temperature_unit=$temperatureUnit&windspeed_unit=mph&precipitation_unit=inch"
    Hid-Write-Summary -Message "Looking up New York weather" -Event Information
    $response = Invoke-RestMethod -uri $locationEndpoint
    Hid-Write-Summary -Message "Response: $response" -Event Information
    $result = @{weather = "Current time: $($response.hourly.time[0]); current temperature: $($response.hourly.temperature_2m[0]) degrees $temperatureUnit"}
    Hid-Write-Summary -Message "Result: $($result.weather)" -Event Information
    Hid-Add-TaskResult -ResultValue $result
    2023-08-14_12-48-42.jpg

    Tip

    In your script, you have direct access to System variables and Custom variables.

    The Variables tab is deprecated and does not offer any functionality not already available directly in PowerShell.

  9. Go to the Settings tab.

    1. Optional: Configure email notifications.

  10. Go to the Schedules tab.

  11. Click Add Schedule.

    2022-07-12_14-02-49.jpg
    1. Enter a Name for the schedule.

      For this example, Scheduled task: Weather report - Nightly.

    2. Configure the schedule as desired.

  12. Click Save.

The scheduled task has been added, and is now listed in Automation > Tasks.

2022-07-12_14-05-48.jpg

It will automatically run on the specific schedule. To manually run it, Manually run a scheduled task. To view its run history, View task run history.

  1. Go to Automation > Tasks.

  2. For the relevant scheduled task, click Edit.

  3. Continue by following the instructions in Add a pre-defined scheduled task or Add a PowerShell scheduled task.

  1. Go to Automation > Tasks.

  2. For the relevant scheduled task, click Delete.

  3. Click Delete to confirm.