Job action based on an event.

Hi All,
Would anyone know a good way using Oracle Scheduler to check when all the jobs have finished in a say daily schedule and then send out a log (job_name, start_time, end_time & run_duration) for all the jobs via email?
We have setup our jobs to run on daily, weekly and monthly schedules. The schedule is a mix of independent jobs and job chains. So when say the daily schedule job finishes we want to send out the run details for all the jobs that ran that night. So this jobs run will be triggered by an event when all the jobs have completed.
Any suggestions would be of great help..
Thanks in advance
DOM

1) that sounds right, you can use the following code to verify calendar syntax expressions
<pre>
create or replace procedure print_schedule_dates
schedule in varchar2,
start_date in timestamp with time zone default null,
number_of_dates in pls_integer default 10
) authid current_user
is
date_after timestamp with time zone;
next_date timestamp with time zone;
actual_start_date timestamp with time zone;
begin
if start_date is null then
$IF DBMS_DB_VERSION.VER_LE_10_1 $THEN
actual_start_date := systimestamp;
$ELSE -- 10gR2 or higher
actual_start_date := dbms_scheduler.stime;
$END
else
actual_start_date := start_date ;
end if;
date_after := actual_start_date - interval '3' second;
for i in 1 .. number_of_dates
loop
dbms_scheduler.evaluate_calendar_string
(schedule, actual_start_date, date_after, next_date);
dbms_output.put_line(to_char(next_date,
'DY DD-MON-YYYY (DDD-IW) HH24:MI:SS TZH:TZM TZR'));
date_after := next_date;
end loop;
end;
exec print_schedule_dates('freq=weekly', sysdate+4, 5 )
</pre>
2) I still maintain that extra runs are harmless once you check that the report has already been sent and immediately exit. But if you really want to eliminate extra runs you should be able to set the start_date for the current job forward to the next start date. There is no one status since there will be several runs of the monitoring job and each run will be 'SUCCEEDED' (unless something fails).
Hope this helps,
Ravi.

Similar Messages

  • Batch job scheduling based on Event AND for the job to complete

    I am trying to schedule a background job based on an event AND based on the job finishing itself.
    Example:
    Job name: Send_Message
    After Event: SAP_NEW_PROCESS Message
    Program:  Program xxxx
    I want that the Send_Message job only runs when the Event SAP_NEW_PROCESS message happens AND the Send_Message job is not running.
    Right now, I could only schedule it based on the event SAP_NEW_PROCESS Message which means that everytime this event happens the job runs and I end up having the job "Send_Message" in multilple intances where the others will immediately cancel since the first job is still running and so I end up with a lot of Cancelled job when it is not necessary to run them all when there is already 1 instance of the Job running.
    How do I set it up in SAP?

    Thanks but I am new to SAP having to set up a batch job.
    The Event "SAP_NEW_PROCESS_MESSAGES" is a standard SAP Event.  We used that such that when a new transaction comes in, the batch job will run but we don't want to run the batch job if the same batch job is already running.
    YOu mentioned that I should set up Job_0.  Do I need to create an ABAP prorgram to check if JOB_1 is running?  How do I set up Job_0?  What is the trigger for my Job_0 to run?
    You also said that I set up Job_1 and trigger that based on the outcome of Job_0 AND at the same time be triggered by the event "SAP_NEW_PROCESS_MESSAGES".  How do I set up  this Job_1 so that it can be triggered by both Job_0 and a new transaction coming in(SAP_NEW_PROCESS_MESSAGES).
    if you can provide me the step by step guide as I am new to this and I only know basic.
    The current set up I have is
    Job_1
    Job Start:
          After Event
                Event: SAP_NEW_PROCESS_MESSAGES
          Step 1: program to run RCOCB002
    I was thinking following your suggestion is this:
    Job_0
    Job Start
          After Event
                Event: SAP_NEW_PROCESS_MESSAGES
          Step 1: program to run - What will be my program to run?
    Job_1
    Job_Start
          After Event
                Event: What will be my trigger for Job_1 and how do I set it up?
          Step 1: program to run RCOCB002
    Edited by: Shirley Te on Mar 10, 2010 3:25 PM

  • Web Service Job Parameters with Job Actions

    I have a set of web service jobs for which I am supplying input parameters. This works fine when defined against a single particular job but i have a need to insert this job based upon a job event and pull some information off of the job the had the event condition occur (i.e. Completed Abnormally). When defining the Job Action to launch the job, the default and override parameter fields are not editable. Has anyone had any luck with this? I didn't notice anything in the documentation but I could have just overlooked this. Any help would be appreciated.
    Thanks,
    kyle

    Me to, and i use Axis for web services (and WebSphere
    WebServices).
    And, if you use bind from text input you get [object Object]
    in general case
    <mx:request>
    <value>{entry1.text}</value>
    </mx:request>
    <mx:TextInput x="23" y="101" text="" id="entry1"/>
    if you enter any text at textinput and delete it you DONT get
    "[object Object]" at web service....
    if you dont enter text you get "[object Object]" at web
    service...
    if you use variable or other elements its the same.
    Any help?
    TIA

  • Is there a way to trigger button's action listeners from key events?

    I rarely do GUI programming, especially not in Java. But now I am working on a GUI app and would like to get some help.
    Say I have a simple GUI consists of a JFrame, and a bunch of buttons on its JToolBar. The buttons on the JToolBar are for navigation of a set of documents, first, prev, next, last etc. All buttons are assigned action command strings, and their all trigger the same instance of action listener. inside of the action listener, it does the correct navigation based on the action command from the event.
    but some users want to be able to use the keyboard to do the navigation, because they think clicking the buttons are too slow.
    So is there a graceful way to receive the different key press events and trigger corresponding navigation actions (hopefully it reuses the code that is already there, e.g. the action listener)? thanks.
    -- Jim

    but some users want to be able to use the keyboard to do the navigation, because they think clicking the buttons are too slow. That is always the case in any GUI. Any application should be designed to use either the mouse or the keyboard.
    All buttons are assigned action command strings,That is not the way the GUI should be designed.
    Instead you should be creating Actions. Then you can add the Action to a button and you can associate the Action with a KeyStroke which is called "Key Binding". This is the way all Swing components work. You can read the [url http://download.oracle.com/javase/tutorial/uiswing/TOC.html]Swing tutorial for more information and examples. Start with the section on:
    a) How to Use Actions
    b) How to Use Key Bindings

  • BACKGROUND  SCHEDULING  based on a event

    Hi,
        I need to execute my program in background ..  based on an event..for example.. here i want to execute   RBDMIDOC program  based on  when ever i change the master data ..
      i created a varient in SE38.. and i enetred into SM37  and  here  what i need to select .. for based on  an event..
    thanks
    Babu

    You can use worfklows to achieve this.
    For more infor check the faq in the Workflow forum, or ask your local workflow expert.
    basically you must first find out which event is triggered, you can find this out with the event trace (SWELS and SWEL) then you must create a workflowtemplate which is triggered by that event and which will schedule the backgournd job. Next you must link the event to the workflowtemplate, either in pftc , tab event, or transaction SWE2.
    ALternatively you can use transaction SWEINST to place a check function module on the event Business object instance. In that FM you can also schedule the job. This is a bit easier than creating a worklfow.
    Kind regards, Rob Dielemans

  • Creation of service request based on an event in ECC

    Hello,
    I want to create service request based on an event in ECC HR. For e.g. events can be employee leaving, Absence for longer period etc.
    Is there a standard way of doing this ? If so could you please let me know the process/steps.
    Regards

    Adding a BOL entity and binding it with the main parent node entity will give access to the main BOL. Using which, we can traverse to the required object using GET_RELATED_ENTITY and change the respective attributes.

  • How to trigger a report based on a event/stored proc or sql dts completion

    Post Author: Crystaldev
    CA Forum: Publishing
    I want to run/trigger a crystal report based on file existence or based on a stored proc/sql dts/a value present in a sql table. The way I want to do is schedule a crystal report in crystal enterprise and then run the report based on a event like file existence or based on a sql dts completion or a value existence in a sql table. We are using crystal reports v10.
    I am not sure how we can do this, any help is appreciated. Thanks.

    Hi
    When you click on View Data, at bottom click on Edit button
    It will prompt a connection details tab wherein you can view and modify the connections
    Nik

  • Is there a way to save a job action for YouTube upload in Compressor 3.5?

    Is there a way to save a job action for YouTube upload? I have about 25 - ten minute clips I want to upload and they all pretty much have the same description and tags. Is there a way to save/make a preset of the job actions that way I don't have to keep inputing the same usernames, passwords, descriptions, tags? Thank you

    the method mentioned by benwiggy will certainly work.  If you want to an option that would give you more options, you could use a PDF Service.  You could then put a specific job on hold while still allowing others to use the printer.
    You can do this by opening AppleScript Editor (/Applications/Utilities).  You can copy and paste the following into an editor window --
    on open printJobs
    tell application "Finder"
    set trapFile to quoted form of POSIX path of (printJobs as string)
    end tell
    set defaultPrinter to do shell script "lpstat -d | awk -F: '{print $2}'"
    do shell script "lpr -P" & defaultPrinter & " -q " & trapFile
    end open
    Save the file as an Application.  You can name it something like Hold Print Job.  Then just put it in the PDF Services directory in the Library directory of your Home folder <yourname>/Library/PDF Services.  You may need to make the PDF Services directory as it may not already be there.
    Once the file is in place, you can use it by using the PDF drop down menu at the bottom left of a print window.  That will send the file to the printer and put it on hold.  Others can still use the printer.  You can then print your file whenever you want.  Just open the print queue as mentioned by benwiggy.  Highlight the job that is Paused.  You will see a little curly icon at the very right (looks like a reload icon in a web browser).  Just click that icon and the job will start printing.

  • How to execute a mapping based on an event

    Hi
    I am on OWB 10.2.0.3. and Oracle 10.2.0.2. I have a mapping which is fine, deploys well, I can execute using the control manager.
    I also created a schedule module in OWB, created a schedule for a specific date and time and also an interval, configured the mapping to this schedule. The mapping gets executed successfully at the scheduled time.
    The requirement is this mapping needs to be executed by an external process (oracle but a different application in a different machine). The team owning this process is ready to insert a record in a table. Which I want to sense and execute this mapping.
    I already have created a procedure so that this mapping can also be run from pl/sql. I can create an after-insert trigger in this table so call this procedure, but that will make the whole think synchronous and the external process will have to wait for this mapping to complete to proceed further which is not acceptable by them.
    Is there a way I can check for the record in this table and exec the mapping from OWB?
    Can somebody please help and provide me pointers how I can schedule a mapping based on an event (insertion of the record) without (preferably) or with Oracle Workflow.
    Thanks a lot in advance!
    Maruthi

    Thanks Detlef,
    The problem I have is the trigger will make it actually synchronous with the process that inserts the record in the table.
    Even if I define the trigger as AUTONOMIUS_TRANSACTION, both the process will not parellel. setting this I can have commits and rollbacks in triggers but they will be synchronous. I want this mapping to run asynchronously so that the main process inserts the record and continues with the rest of the process while the mapping can be executed independently.
    For this reason I am looking for something which will allow me to do this without a trigger on the table.
    As mentioned in your refereed post, I can use CDC, but not sure how good is CDC and will this be an overkill to implement and use CDC for this purpose. Any simpler solution available?
    Any inputs please?
    Thanks once again!
    Regards,
    Maruthi

  • Different actions based on different drop down selection

    Hi,
    I am new to WebDynpro so still getting to used to the differences with what I am used to. My question is this:
    Is it possible to create a drop down list (by key) in a top view that allows the user to display one of three views in the bottom view? I know it is possible if I add a button, but I want it to look like one form so that the user is unaware of the difference. The "logical" way to me would be to have an action created for each option in the drop down list, but this does not seem possible. Any suggestions on how I could do this?
    Thanks,
    Helen

    As already explained by other posters, this is possible:
    Define an action with a parameter "selectedKey" of type string.
    Bind the DropDownByKey.onSelect event to this action.
    Map the event parameter "key" to the action parameter "selectedKey" by writing this line of code inside method wdDoModifyView():
    if (firstTime)
      IWDDropDownByKey dd = (IWDDropDownByKey) view.getElement("<ID of your drop-down>");
      dd.mappingOfOnSelect().addSourceMapping
        "key", /* event parameter name, see JavaDoc */
        "selectedKey" /* action parameter name */
    The effect of this mapping is that at runtime, the action handler parameter "selectedKey" contains the key that has been selected from the drop-down list.
    In the action handler, you can navigate to the view that corresponds to the selected key by calling the outbound-plug to this view. These firePlug* methods will be generated by the framework, if you have defined the corresponding navigation links in the view modeller.
    But: I would not use at all a drop-down list to switch views because this will not match most user's expectation. Links are more appropriate to indicate navigation to other views.
    Armin

  • Single form Multiple Actions based on button click

    Hi,
    I have to call two different actions based on button click from single <form > .
    How to achive this?.
    Thank you

    Hi,
    I am using struts <html:form> and my code is as follows
    <script language="javascript">
              function setAction(val){
         if(val==A){
                   window.open(document.forms[0].action="preview.do");
         }else if(val==B){
         document.forms[0].action="create.do";
              document.getElementById('fcreate').submit();
    </script>
    <html:form action="/create.do" >
    <html:text property="name">
    </html:form>
    action is mandatory for <html:form>
    Its not sending the form elements, when I click the preview button.
    Create button works fine. In struts-conig, I have taken same form name for create and preview actions
    Please give me some tips
    Thank you

  • Delay - job created by the RAISE EVENT

    It's possible to change the scheduling of a job created by a RAISE EVENT, and instead of executing immediately, to schedule it as +1 minute delay?
    Thanks!
    PS: i have to wayt because, after the event, some tables are updated in my program and i have to wait the commit
    Edited by: Was Wasssu on Sep 6, 2010 9:08 AM

    That's true, but from the sparse information in the original post I understood that he is issueing a COMMIT WORK anyway in his code. So Mr. Wasssu, are you inside a customer exit? Anything else we need to know?
    Thomas

  • Command line with templet?  Wan't a "Job action" to upload to Youtube.

    I'm looking for a automated way to upload to Youtube. We now have job actions in compressor that will do this but it's not stored in a "droplet". Is there a way from the command line to do this? I'm hoping to create a watch folder that will trip a script that will add the file and upload all in one.
    Can a templet be used in a command line maybe?
    I also have Final Cut server if that could help.

    So either install and configure the
    Python YouTube API
    or
    the Ruby "youtube_g" RubyGem
    Once installed if you can write a script to have Final Cut Server upload stuff to YouTube.
    Or you could write Compressor script to do this as well.
    Hope this helps.
    Nicholas Stokes
    XPlatform Consulting

  • How to show reasons of action based on PA?

    Experts
    We are in the process of implementing for different countries simultaneously. We have 10 actions which are common for all these countries. However these countries have different reasons of action for these diferent set of 10 actions. I want to show only country specific reasons of action based on PA. Is there any way by which it could be done.
    Regards

    Hi
    I feel so to....maybe you can create user groups and also then have different actions ..... but this is a high price to pay for the same. You may want to prefix your action reason with two character country code, and train your users accordingly, You can also then have a user exit based on which user needs to use which action.......that's if you want a very strict controll.....best regards

  • Qmaster crashes on Blu-ray burn job action?

    Hi there,
    I tried mimicking the Ripple-training by Brian Gary (thanks Brian for making and sharing this ), in which a Blu-ray disc is made using the new template option in 3.5. However, after the successful transcoding to 264 of a ProRes file., the batch monitor displays that it has another 2 to 3 minutes to go, but shows this overnight... With the disc shown in the Dock ('Create Disc'). Wondering what it was doing I checked the Activitymonitor showing that Compressor is still active but Qmaster seems to have crashed. So I removed Qmaster and Compressor using FCP remover, to re-install the two applications. You guessed it, to no avail. Anyone with ideas to solve this one?
    Here's the Ripple Training link I meant.
    http://rs6.net/tn.jsp?et=1102648694439&s=10891&e=001EvL1oAvU2YuWVH6ZWbSjxbRCkh6P lhGwz0rcWgdNmeayaSrAkHVNYdds-lDuyyPVM7hohfNS_s5BI5TkLStV0TKpH3ESZ8pW027aJpdLZVEwAqca75WhqzdYCMl95W5iJ8IMw9EMh88IyNoDszzw==
    Message was edited by: ibobi; additional info

    Been there!!! Have erased my BD-RE about 12 times to figure this out. Bottom line... Bit rate was the limiting factor!! 15 Mbps average was ideal. My 2 hour dance rectital now no longer does the "hanging" thing either. I used compressor and used the preset "Blu-ray" settings then changed the bit rate to 15 Mbps ave (17.x max). Works fine now.
    Default 30 Mbps lots of hangs. Worked down to 25,20,18, then finally 15. Looks great and plays fine !!
    Don't use the share command !! Glitchy.
    In compressor set the "job action" to Make a Blu-ray and it will make a .img file which you can burn from Disk Utility or Toast as the image file to either a Blu-ray or DVD depending on the size. Good luck.

Maybe you are looking for

  • How do run iPhoto from an external hard drive?

    I've moved my entire iPhoto library to an external hard drive and now can't remember how to open up iPhoto from that drive.

  • SQL Developer 2.1.1 seems to be working good

    Just installed it and started testing. Looks like we can EXPORT data from SQL Server tables again. Also, appears we can see synonyms from OTHER USERS. This is a good thing.

  • Dynamic hide edit link in report, how?

    regarding apex 3.2 in a standard report i use the first column to provide an edit link (url redirecting to another page), this far nothing mind-boggling. but the edit link should only be available if the actual row meets special creteria, e.g. if the

  • ITunes Shared Library Streaming Rebuffering Issues

    Hi everyone... Streaming my iTunes library from Vista Laptop (wireless) to a Windows XP desktop PC (hardwired) over Netgear wireless router via iTunes 8.2 on both computers. The problem I have is that it has to rebuffer the stream every min 1/2. Does

  • Why is DW too dumb to leave css files callapsed.

    Why is DW too dumb to leave css files callapsed in panel when we leave them so. [Deleted] DW always expands all files so we can close them all every darn time we open the file. [Personal abuse deleted by moderator]