|
In my experience, scheduling tools like Autosys are really good about creating schedules with dependencies, firing off notifications, and working with your trouble ticketing system. But how they kick off these jobs is very simple: They execute commands from the Operating System command line. Here’s something I’ve been working on to allow my client to use a 3rd party tool like Autosys to drive the batch schedule, but do it in such a way that lets process scheduler run the individual processes so we can see the status & logs in process monitor and restart app engine jobs through the front end when they fail. Before we get started, let me just say that I realize that 3rd party scheduling tools like Autosys sell a PeopleSoft plugin that will do this. But these days not every company is willing to spring for the extra cash for nice-to-have functionality like this. If you’re reading this article chances are you’re not the guy in charge of your IT organization’s budget and you know what I mean. Usually to set up your batch schedule, you come up with a generic script to fire off an app engine job based on certain parameters like run control id and process name. Then you create the same script for SQR’s, COBOL’s, throw in some FTP scripts to move files around, spend like 10,000 hours debugging, and viola you’re done. Now there’s no reason why the scripts that launch your AE’s, SQR’s or COBOL’s couldn’t schedule the process inside of process scheduler instead of launching it directly. Except for the fact that you probably don’t want to do all of the required inserts to the process scheduler tables manually because you never know when you’ll screw up process scheduler, either now by getting the next PRCSINSTANCE wrong or in the future when you do a PeopleTools upgrade. But PeopleCode has a ProcessRequest API that takes care of all of the details regarding how to schedule a process. And you can write PeopleCode in an Application Engine program which can be called from a command line by Autosys. If we write our code so that our AE program keeps running until the job it scheduled completes and returns a response of Success or Fail so that Autosys can go to the next job or handle the exception as required, we’ll have something pretty cool. Sound like fun? Great, let’s get started!
|