There exist several methods for doing that. 1. Use global variables as additional semaphores. On job start check for the global value and if a flag raised simply exit, otherwise set the value and continue. Example (JAL script) Dim( GLOBAL.jobX_flag, number ) IfThen( GLOBAL.jobX_flag, ABORT ) Set( GLOBAL.jobX_flag, 1) ... the main job part goes here ABORT: 2. Similar, use registry, files or database instead of global variables. A number of commands is supported to read/write to/from registry, files, etc... 3. Enable/disable job on startup/finish JobEnable ("jobX", FALSE) ...main job part here JobEnable ("jobX", TRUE) 4. Change file-watch schedule to time-based schedule (run every X minutes). In the script check for the file and additional processing and if only file is present do the main part. : Hi, : I have scheduled a job to run : every 5 minutes. : However, if one instance of the job takes longer than : 5 minutes to complete, I do not want another instance : to start until the first one finishes. : How do I prevent more than one instance of a job to : run? : Thanks : Sotiris
|