AutoSys Interview Questions & Answers
What is AutoSys? How is it used in production?
AutoSys is a job scheduling and workload automation tool used in enterprise environments.
In production, it helps automate business operations by scheduling and executing jobs
(scripts, programs, commands) on various systems at predefined times or in response to
events. It ensures timely execution, reduces manual intervention, and improves process
efficiency.
What are the different types of jobs in AutoSys?
AutoSys supports several job types:
- Command Job: Executes a single command, script, or program.
- File Watcher Job: Monitors a specific file on the server for existence or changes.
- Box Job: A container that holds other jobs (command, file watcher, or box jobs). It is used
to group and manage related jobs together.
What is a JIL file? What does it contain?
JIL (Job Information Language) is used to define jobs in AutoSys. A JIL file contains job
attributes such as job name, job type, command to execute, server (machine) name, owner
(user ID), schedule (run time), dependencies, box membership, and log file paths. It's
commonly used to create or update jobs in batch.
What is the difference between command and box jobs?
Command Job: Executes a specific script or command on a server.
Box Job: A grouping of jobs that allows managing them together. It does not run any
commands itself but contains other jobs and controls their execution order and
dependencies.
How do you set dependencies between jobs in AutoSys?
Dependencies are set using the 'condition' attribute in a JIL definition or job configuration.
For example:
condition: success(jobA)
This means the job will only start if jobA completes successfully.
What happens when a box job fails?
If a box job fails, the jobs inside the box may not start unless they are marked to run
regardless of the box's status. The overall box status may be FAILED if any of its child jobs
fail, depending on the box success criteria.
How do you force start a job regardless of its dependencies?
You can force start a job using the following command:
sendevent -j job_name -E FORCE_STARTJOB
This will run the job immediately, bypassing conditions and dependencies.
How do you check job status or history?
Use the following commands:
autorep -j job_name -r
To view history:
autorep -j job_name -d or -h for historical info.
How do you troubleshoot a job stuck in ‘Starting’ or ‘Activated’?
Check the job logs and the remote agent status. Possible reasons include:
- Agent is not running
- Job command is hanging or waiting for input
- Network issues
- Permissions or path errors in script
Use 'autorep' and review std_out/std_err log files.
How do you integrate a shell script or Python script in AutoSys?
You can include the script in a command job like:
command: /path/to/script.sh
or
command: python3 /path/to/script.py
Ensure the script has execute permissions and the correct interpreter is specified in the
shebang line.