Skip to content

Run Script Job

A Run Script Job enables running scripts on remote Agents. Run Script Jobs can be launched manually or initialized automatically based on a predefined schedule. For more information, see Scripts.

Note

You cannot run scripts on Agents with the limited user option enabled. For more information, see Limiting admin’s access to the Agent.

Create a Run Script Job

To create a Run Script Job:

  1. In the Management Console , from the top menu, select Jobs.
  2. Select Configure Jobs , then click + CREATE NEW JOB.

  3. Select Run Script , then click Next.

  4. On the DETAILS tab:

    1. Enter the name.
    2. Enter the optional description that will help understand the purpose of this Job, then click Next.
  5. On the SETTINGS tab, assign Job access permissions:

    1. In the User groups section , click + ADD USER GROUP.
    2. Select groups and click Add.

    3. For each group, choose the Job access level:

      • View only - Permission to view the Job on the Jobs list and access its status information.
      • Run - Permission to initiate a Job run (applicable to Distribution, Consolidation and Script Jobs).
      • Edit & Run - Permission to edit the Job's configuration and initiate Job runs. Users with Edit & Run permission cannot delete a Job.
      • Full Access - Permission to edit and delete a Job as well as initiate Job runs.

 4. Click **Next**.

  1. On the PROFILE tab, select Job settings - a pre-defined set of parameters that fine-tunes the Job run, then click Next.
    Tip: Select Unique for this Job to customize profile settings specifically for the Job being set up.

  2. On the AGENTS tab:

    1. Select individual Agents or Agents groups, on which you want to execute scripts.
    2. Click Specify path to select path or click the suggested path to modify it.
    3. Select storage location option:

      • Direct path - Provide a direct, absolute path to the Job folder.
      • %FOLDERS_STORAGE% - A special path macro pointing to agent's default storage folder location.
        Note : Select Ask user to prompt the user in the Agent UI to select folder upon initializing the Job.

      • %DOWNLOADS% - A path macro pointing to downloads folder location. The path that the macro is resolved to depends on the operating system the Agent is running on. For details, see Path macros.

      • %HOME% - A path macro pointing to the home folder location. The path that the macro is resolved to depends on the operating system the Agent is running on. For details, see Path macros.
      • %USERPROFILE% - A path macro pointing to user profile folder location. The path that the macro is resolved to depends on the operating system the Agent is running on. For details, see Path macros.
        1. Enter folder's path or click Browse to browse the file system and select the source folder location.
          Note : The option to browse remote file system is available only if the Agent is online.
    4. Click Save , then click Next.

  3. On the SCRIPT tab, provide a script to be executed on selected Agents, then click Next.
    Note : This can be a standalone batch command (for example, to execute a binary file or copy files) or a bash script uploaded to the Agent in advance. PowerShell commands aren't supported directly, but you can add them to a .ps script and execute the script powershell.exe -File <script name> or you can run individual PowerShell commands powershell -noprofile -command <command>.

  4. On the JOB SCHEDULER tab, select if you want to run this Job manually, or if it should run periodically.

    • Run manually - Job run will be initialized manually.
    • Run at - Initialize Job run on a specified date and time.
      Note : The Job run will be initialized at the Agent's local time. A scheduled Job run will start only if the previous one has been completed no later than 5 minutes after the scheduled run time. For example:

    • A Job run is scheduled for 11:00 AM, but the Job run launched manually finished at 11:04 - the scheduled Job run will be initiated.

    • A Job run is scheduled for 11:00 AM, but the Job run launched manually finished at 11:06 - the scheduled Job run will not be initiated.
    • Run every N minutes/hours/days - The Job run will be initialized at a specified frequency. You can define start and end date of this scheduled Job runs. In case the current Job run isn't finished on time (before it's time for the new run), the consecutive run is initialized right after the current Job run completes.
    • Repeat weekly/monthly - Initialize Job runs on specific weekdays or days of the month.
      Note : The Job run will be initialized at the Agent's local time. A scheduled Job run will start only if the previous one has been completed no later than 5 minutes after the scheduled run time. For example:

    • A Job run is scheduled to start daily at 11:00 AM. The Job run started on Monday, completes on Tuesday at 11:06 AM - the next Job run will be initialized the following day at 11:00 AM.

    • A Job run is scheduled to start daily at 11:00 AM. The Job run started on Monday, completes on Tuesday at 11:04 AM - the next Job run will be initialized immediately.


Note : You cannot enable the Job scheduler with the Choose on start option selected.

  1. On the NOTIFICATIONS tab:
    1. Click + ADD NOTIFICATIONS.
    2. From the Trigger drop-down list, select an event that will trigger notification.
    3. (Optional) Click Skip notice if Jobs did not transfer files to disable notification in case there were no files transferred during the scheduled Job run.
    4. Click + ADD RECIPIENT and select one of the options:
      • Add me - Add the currently logged in user.
      • Add user - Add another Resilio user.
      • Add e-mail - Add an email address of the recipient.
      • Add webhook - Add a predefined webhook URL.
    5. Click Save , then click Next.
  2. On the SUMMARY tab, verify your Job's configuration, then click Save.