Backing up Windows schedules
Hello,
I like to use Windows Scheduler to run many of my jobs on the Oracle database server. For example:
Daily backup
Exports of critical files
Cleanup jobs
etc...
I keep my jobs in a scheduler folder called 'Oracle' so they are separated from the other Windows tasks and easy to identify.
As part of my daily backup, I also back up the Windows Schedules so they are available for recovery or transfer to another system. I would like to share how this is done in case anyone else is interested.
The following code in a Windows batch file does the job. The first schtasks command queries the scheduler and returns a CSV file of the tasks in the 'Oracle' folder. The for loop reads the CSV file and calls subroutine :extrsched which uses schtasks to extract and create an xml file for each scheduled task.