Script job allows to remotely run a script or execute a command on agents. Basically these are Script commands.
How to configure a Script job
1) Create a new Script job
Go to Jobs tab -> Create new job and pick "Script job". In step-by-step wizard give it the name, edit description and pick the group of agents where the script is to be executed.
2) On step Script define the script itself.
This can be a standalone batch command (for example, to execute a binary, copy the files around) or a bash script prepared and delivered to the agent in advance. PowerShell is not supported directly. As an option either add the commands to a .ps script and execute it with "powershell.exe -File <script name>" or run with "powershell -noprofile -command <command>".
3) Step Path allows to pick the current directory for script execution.
This can be default Path Macro or a custom location. After script execution, either successful or not, agent will dump job's log into .sync folder inside this directory.
4) Job scheduler
Defines when the job will be launched. Shows current admin's local time, which may be different from time the physical server where Console is installed!
- Run at - at the preferred date/time (local agents' time);
- Repeat manually - job won't start until manually launched with "Start" button;
- Repeat hourly - job will run every N hours. Scale is 1 hour, integer.
- Repeat daily - job will run on a daily basis at the selected time. Scale is 1 day, integer.
- Repeat weekly - job will run on selected days on the week, additionally you can set the exact time of the day.
In all those periodic schedules (hourly, daily and weekly) it's possible to select the starting and ending points for the job.
5) Revise the job and save.