Workload Automation

Expand all | Collapse all

Schedules from Event for all Applications in CAWADE

Jump to Best Answer
  • 1.  Schedules from Event for all Applications in CAWADE

    Posted 05-23-2019 02:42 PM

    Is it possible to retrieve all Schedules for the Date-Time\Manual Events across all Applications in CA WADE?

     

    Thanks

    KG



  • 2.  RE: Schedules from Event for all Applications in CAWADE
    Best Answer

    Posted 06-12-2019 05:50 PM
    Not sure how comfortable you are with Powershell, but what we do seems to work pretty well for this sort of thing.  We have a daily job that exports all the DE artifacts (Applications, Events, Alerts, Resources etc) using the Export Import utility.  While these do not have a .xml file extension, they are in fact xml files which Powershell is very adept at reading.  A script like this will export a list of your event schedules to a file called Schedule_List.txt

    Get-ChildItem -Path D:\CAWExport\event| ForEach-Object {
    [xml]$xml = Get-Content $_.FullName
    $line = $xml.eventenum.eventsch.schedule.scheduleelement | Out-File D:\CAWExport\Schedule_List.txt -Append
    }​


    You would need to modify this because the code doesn't take into account the fact that one event may have multiple schedule elements.  It also just outputs the schedules without listing the Event it came from.  The text file will also have some blank lines because when it tries to process a file trigger event, that xml will not have the eventsch node.

    If you go down this road I can assist a bit more, but this should get you started.




  • 3.  RE: Schedules from Event for all Applications in CAWADE

    Posted 30 days ago

    Hi Andy,

    I have created a PowerShell script as well to extract the schedule statements plus suspend and hold count. My idea so far was to have it available for application users to have during their outages. They could look at the report to see what apps may be impacted during their outage.

    Question I have is if there is a way to create a report to pull from the database itself? As you know, once you create your schedule list it is essentially out of date because event schedules could change. I was hoping to find a way to pull from the db so that anyone can run it and maybe even narrow down to their specific application groups by entering something like XYZ to get all events starting with XYZ

    If it isn't possible to pull from the db then this Powershell script will assist some. I guess I could setup a job to email the app group and modify the script to only output their events. Going down that path I could see myself setting up a bunch of different jobs, one for each app group that would need the report




  • 4.  RE: Schedules from Event for all Applications in CAWADE

    Posted 27 days ago
    Edited by Nitin Pande 27 days ago
    Hi Travis,
    The events are in XML format.  They cannot be simply queried by SQL.  In cases of upgrades and migrations, you can use Forecast reports.
    Create a simple forecast report that will show you events scheduled for next few hours.  See screenshot for an example:
    forecasting for next few hours
    Note: This will show you what is scheduled, but it won't tell if you have any cyclic events. 
    In any case, if the DE server is down, cyclical events won't get executed for all the missed times.  E.g. An event runs every 15 minutes.  Say it runs at 00, 15, 30, 45 minutes of the hour.  If DE was down from 9:10 - 9:50, then it will only execute the 9:15 event when it comes up at 9:50, because 9:15 would have been calculated and entered in DB when 9:00 was executed.  Then it will calculate next event, which should be 10:00 and so on.
    It will not recalculate all the events for the time it was down, like 9:30, 9:45 etc.  DE can only go forward and not back in time.

    Thank you,
    Nitin Pande
    Broadcom


    ------------------------------
    [Designation]
    [City]
    ------------------------------



  • 5.  RE: Schedules from Event for all Applications in CAWADE

    Posted 23 days ago
    Thanks Nitin, we ended up going with a forecast. I guess I was hoping there was some easier way of getting the schedule statements because I have had several customers ask for the statement for various reasons such as when DE is taken down and if their applications which interacts with DE, is being taken down. Of course it is possible to get it via the XML, I was hoping it could be thrown in a report and ran anytime against the db.

    Thank you as always Nitin! Hope you have a great weekend.