Windows Jobs
Windows Jobs automate processing steps on Windows target systems. You can run Widows Jobs independently or include them in a Job Group (JOBG) or Workflow (JOBP). For detailed information on how Automic Automation integrates with Windows, see AE and Windows.
The Windows page contains the Windows-specific execution parameters.
Defining Windows Jobs
A Windows Job definition consists of several pages:
- Standard pages, available for all object types:
- Additional pages that are always available for executable objects:
- The Windows page for Job-specific parameters.
To define the start parameters of a Windows job, do the following:
Define how the Automation Engine Windows Job object should start the job on the Windows target system.
-
In Interpreter Type, select an interpreter type for script execution:
-
Batch: Executes the Process page JCL as a Windows batch file.
-
Command (cmd.exe): Runs external and internal commands in the Windows CMD Shell. For internal commands such as dir, cd or echo, use the Batch option or cmd.exe /c dir.
-
Custom interpreter: Administrators can specify a custom interpreter in the Windows Agent INI file. The JCL contained on the Process page is transferred as a file to the selected interpreter. For setup details, see the descriptions of ECPEXE= and ecpext= in the Agent Windows 64-bit documentation.
Note: Different interpreters require specific single-line comment prefixes. Set the correct prefix using the &UC_REM_PRF variable, for example:
:set &UC_REM_PRF = "# "
Add this to the Pre Process page so the custom interpreter handles comments correctly.
Best Practices
Windows categorizes programs as follows:
- Graphical User Interface programs
- Console programs
- Operating system commands, for example DIR or SET
Run GUI and console programs from the command line to ensure the Automation Engine can retrieve accurate exit codes. Execute OS commands via BAT files, and always verify return codes to handle errors promptly. Test your BAT files and command lines directly on the target system before running jobs through the Automation Engine, using the same user account intended for job execution.
-
Define a specific Working Directory for each Job to maintain predictable execution context.
-
Use the Batch Mode: Log on as batch user to run the Job in non-interactive mode, where no windows, desktop or other user interface elements are available. Ensure that the account used to run the Job has the Log on as a batch job privilege defined in the Local Security Policy.
If you do NOT select this option, the Job starts in interactive mode, similar to a standard user login with a visible desktop session.
-
In View Job on Desktop specify whether you want to display the Job execution. This option is useful for GUI programs that show messages or require user action. It works only if the Agent runs in a user session (for example, when started manually from the desktop) or from the Service Manager with the "Allow service to interact with desktop" option enabled for the Service Manager service.
-
Some Windows jobs or programs start child processes that run asynchronously. The parent process may end before these child processes finish, causing Automic Automation to mark the Windows Job as complete prematurely. This can result in:
-
Incorrect reporting information
-
Abnormal Job termination if restarted while child processes are still running
-
Unintended results when canceling parent jobs, as child processes may continue running
To prevent these issues, connect jobs and their child processes using the Automic Automation Windows Job Object options. You do so with the Use Windows OS Job Object options:
- Default setting from agent: Uses the default specified in the Windows Agent INI file.
- Yes: Connects parent and child processes, ensuring proper job status and cancellation.
- No: Leaves parent and child processes unconnected.
-
For information on the Job Report section, see Job Reports.
-
Save your changes
See also:
{"URL":["/*.*/awa/pa_view_JOBS_WINDOWS"],"heroDescriptionIdentifier":"ice_windows_jobs","customCards":[{"id":"ice_winjob_defining","title":"Defining Windows Jobs","type":"customize","url":"https://docs.automic.com/documentation/webhelp/english/ALL/components/DOCU/*.*/Automic%20Automation%20Guides/Content/AWA/Objects/obj_jobs_WIN.htm","languages":["en-us"]},{"id":"ice_windows_attributes","title":"Windows Job Attributes","type":"customize","url":"https://docs.automic.com/documentation/webhelp/english/ALL/components/DOCU/*.*/Automic%20Automation%20Guides/Content/AWA/Objects/obj_job_Attributes_Windows.htm","languages":["en-us"]},{"id":"ice_attributes_alljobs","title":"Attributes for all Job Types","type":"customize","url":"https://docs.automic.com/documentation/webhelp/english/ALL/components/DOCU/*.*/Automic%20Automation%20Guides/Content/AWA/Objects/obj_job_Attributes_All.htm","languages":["en-us"]},{"id":"ice_registered_job_output","title":"Registered Job Output","type":"customize","url":"https://docs.automic.com/documentation/webhelp/english/ALL/components/DOCU/*.*/Automic%20Automation%20Guides/Content/AWA/Objects/obj_Job_RegisteredOutput.htm","languages":["en-us"]},{"id":"ice_scripting_and_the_ae_scripting_language","title":"The Automation Engine Scripting Language","type":"customize","url":"https://docs.automic.com/documentation/webhelp/english/ALL/components/DOCU/*.*/Automic%20Automation%20Guides/Content/Script/Writing/AE_Scripting_Language.htm","languages":["en-us"]},{"id":"ice_windowsjob_video","title":"Watch the Video","type":"customize","url":"https://docs.automic.com/documentation/webhelp/english/ALL/components/DOCU/*.*/Automic%20Automation%20Guides/Content/AWA/Objects/obj_jobs_win_VIDEO.htm","languages":["en-us"]},{"id":"ice_jobs_overview","title":"About Job Objects","type":"customize","url":"https://docs.automic.com/documentation/webhelp/english/ALL/components/DOCU/*.*/Automic%20Automation%20Guides/Content/AWA/Objects/obj_job.htm","languages":["en-us"]},{"id":"ice_jobs_workingwith","title":"Working with Job Objects","type":"customize","url":"https://docs.automic.com/documentation/webhelp/english/ALL/components/DOCU/*.*/Automic%20Automation%20Guides/Content/AWA/Objects/obj_job.htm","languages":["en-us"]},{"id":"ice_working_with_objects","title":"Working with Objects","type":"customize","url":"https://docs.automic.com/documentation/webhelp/english/ALL/components/DOCU/*.*/Automic%20Automation%20Guides/Content/AWA/Objects/obj_WorkingWithOverview.htm","languages":["en-us"]},{"id":"ice_job_executing","title":"Executing Jobs","type":"customize","url":"https://docs.automic.com/documentation/webhelp/english/ALL/components/DOCU/*.*/Automic%20Automation%20Guides/Content/AWA/Executions/Exec_Jobs.htm","languages":["en-us"]},{"id":"ice_ExecutingObjects","title":"Executing Objects","type":"customize","url":"https://docs.automic.com/documentation/webhelp/english/ALL/components/DOCU/*.*/Automic%20Automation%20Guides/Content/AWA/Executions/obj_Executing_overview.htm","languages":["en-us"]},{"id":"ice_Object_AnalyzeLastExecution","title":"Analyzing the Last Execution of a Job","type":"customize","url":"https://docs.automic.com/documentation/webhelp/english/ALL/components/DOCU/*.*/Automic%20Automation%20Guides/Content/AWA/Objects/obj_WkgWithAnalyzeExecData.htm","languages":["en-us"]},{"id":"ice_jobs_monitoring","title":"Monitoring Jobs","type":"customize","url":"https://docs.automic.com/documentation/webhelp/english/ALL/components/DOCU/*.*/Automic%20Automation%20Guides/Content/AWA/ProcMonitoring/JOBSMonitor/PM_MonitoringJobsOverview.htm","languages":["en-us"]},{"id":"ice_monitoringtasks_overview","title":"Monitoring Tasks","type":"customize","url":"https://docs.automic.com/documentation/webhelp/english/ALL/components/DOCU/*.*/Automic%20Automation%20Guides/Content/AWA/ProcMonitoring/PM_MonitoringTasksOverview.htm","languages":["en-us"]},{"id":"ice_ExecutionData","title":"Execution Data","type":"customize","url":"https://docs.automic.com/documentation/webhelp/english/ALL/components/DOCU/*.*/Automic%20Automation%20Guides/Content/AWA/Reports/Executions_Overview.htm","languages":["en-us"]},{"id":"ice_jobreports","title":"Job Reports","type":"customize","url":"https://docs.automic.com/documentation/webhelp/english/ALL/components/DOCU/*.*/Automic%20Automation%20Guides/Content/AWA/Reports/Reports_Jobs.htm","languages":["en-us"]},{"id":"ice_ReportsOverview","title":"Understanding the Reports","type":"customize","url":"https://docs.automic.com/documentation/webhelp/english/ALL/components/DOCU/*.*/Automic%20Automation%20Guides/Content/AWA/Reports/Reports_Overview.htm","languages":["en-us"]},{"id":"ice_reportsview_workingwith","title":"Reports Window","type":"customize","url":"https://docs.automic.com/documentation/webhelp/english/ALL/components/DOCU/*.*/Automic%20Automation%20Guides/Content/AWA/Reports/Reports_Window.htm","languages":["en-us"]},{"id":"ice_AWIs_CommonFunctions","title":"Common Functions","type":"customize","url":"https://docs.automic.com/documentation/webhelp/english/ALL/components/DOCU/*.*/Automic%20Automation%20Guides/Content/_Common/CommonFunctions/CF_OverviewOfChapter.htm","languages":["en-us"]},{"id":"ice_UnderstandingPA","title":"Understanding the Process Assembly Perspective","type":"customize","url":"https://docs.automic.com/documentation/webhelp/english/ALL/components/DOCU/*.*/Automic%20Automation%20Guides/Content/AWA/Objects/ProcessAssembly.htm","languages":["en-us"]},{"id":"ice_Overview_AWI","title":"Understanding the User Interface","type":"customize","url":"https://docs.automic.com/documentation/webhelp/english/ALL/components/DOCU/*.*/Automic%20Automation%20Guides/Content/_Common/GettingStarted/GS_OverviewAWI.htm","languages":["en-us"]}]}