How To: Create a Basic Job
This example shows how to create a simple job to run the "Notepad" program from adTempus.
To create the job:
- Select the Job Group that you want to create the job in. Right-click the group's name and select New job from the pop-up menu. (If you don't have any Groups defined, or want to create the job in the root group, right-click the Jobs node.)
- The Job Properties window will open. Though adTempus offers many options, a simple job requires only a few things.
- Enter a Name. Give the job a unique, descriptive name, such as "Run Notepad."
- Enter the User Account. Type the user ID for the Windows user account the job should run under. If the account is a domain account, include the domain, for example mydomain\myuserid. When you leave the User Account box, you will be prompted to enter the password for this account. For this example, use your own user ID.
- Click to the Steps page.
- Click Add... and select the "Execute a program, batch file, etc." task type. This creates a Program Execution Task, which runs a program or batch file and is the most commonly-used kind of task.
- The Program Execution Task properties window will open.
- Next to the Target box, click the "..." button to browse for the file to execute. Browse to the Windows directory (usually "c:\windows") and select notepad.exe.
- Click OK to save the task properties and return to the job properties.
- Click OK to save the job.
- The new job will now appear in the folder.
Because this job does not have any Triggers assigned to it, adTempus will run it only if you request it. To run the job:
- Right-click the job's name and select the Run command. The Execute Job window will be shown.
- Check the Make the job visible on my desktop option.
- Click OK to start the job, then click Close to acknowledge the informational message.
- The job's status in the Console will be updated to show that it is running, and the Notepad program will open on your desktop.
This example assumes you are running the adTempus Console on the same computer where the adTempus server is installed. If you are not, or if you are connected to that computer through a Remote Desktop or Terminal Services connection, you may not be able to see the Notepad program running on your desktop. In this case you will need to terminate the job by right-clicking it and selecting the Terminate command.
- Close Notepad. The job's status will be updated to show that the job has finished.
Next Steps
Most jobs will have a Trigger so that adTempus will run them automatically. The most common trigger is the Schedule Trigger, which runs the job at specified days and times. We'll add a simple Schedule Trigger to the job you just created.
- Double-click the job to display its properties, then click to the Triggers page.
- Click the Add... button and select "Execute according to a schedule." The Execution Schedule Properties window will open.
- On the Date Selection page, check the Trigger every 1 days option. These settings will cause the job to run every day.
- Click to the Time Selection page.
- Select the Trigger at these times option.
- Below the list, type in a time when the job should run. For this example, enter a time that is two or three minutes in the future.
- Click the button to add the time to the list.
- Click OK to save the schedule properties. The Schedule Trigger properties window now appears, where you could set additional trigger options.
- Click OK to return to the job.
- Click OK again to save the job and return to the Console.
- After a moment you will see a Next Start time for your job.
- When the scheduled time arrives, the job will start.