[an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive]
24x7 API - Examples of Using Job Definition Language Commands
1. About This Example
This example demonstrates how to setup 24x7 Scheduler to accept and execute new jobs submitted by using email messages
2. Email Listener Job
First create a job that will check all incoming email messages. Name is as Email Listener. If a message has "Create dynamic job" subject this job will save the attached JDL file (for example: dynamic.jdl) in the default temporary directory (for example: c:\temp) then will run 24x7 command with /SCRIPT c:\temp\dynamic.jdl parameters.
The 24x7 Scheduler will process previously saved c:\temp\dynamic.jdl file and will create a new job whose definition is specified in this file.
Set Email Listener job to run often, for example every 10 minutes. Specify "email message" with the subject "Create dynamic job" as the job trigger. Make sure to check Save Attachments option. Specify 24x7 /SCRIPT c:\temp\dynamic.jdl command to be executed after receiving the specified message.
Now you can use the 24x7 Scheduler to dynamically create jobs that will run programs, update database, etc on the remote computer running 24x7 Scheduler. Such dynamic jobs on demand can be created from anywhere in the world. From now on, all you will need is to send an email message with the desired job definition specified in the dynamic.jdl file. Imagine a situation when you are at home and you got an email notice from 24x7 Scheduler running in the office that the job "Overnight data load" failed. You know what you to do, so you can quickly create a new dynamic.jdl file with the Fix It instructions.
3. Example of DYNAMIC.JDL file
; Create new one-time job to run RAS Dial-Up Networking in HOST mode
; Specify generic job properties
NAME=Dynamic job created via e-mail message
; Run RAS dialer
; Wait 5 seconds to allow RAS dialer to initialize
; Send keystroke to enter HOST mode then start Listener
DESCRIPTION=This jobs starts RAS dialer in HOST mode
; Save all changes to submit this new job