Time checking, running events based on time

Hi,
I was hoping someone could suggest a better, or more accepted method that will activate a daily maintenance program based on the time of the day...
I was thinking along the lines of making a thread that will check the time, sleep for a second, check the time, and so on, and when the time is 12:00 or whatever, it will create and run a maintenance object or thread.
It seems rather primitive, or crude, so I'm hoping someonne can post a more elegant solution?
Thanks!

TimerTask
http://java.sun.com/j2se/1.3/docs/api/java/util/class-use/TimerTask.html

Similar Messages

  • Availability check run requirement in the Sales order Save user Exit.

    Hi Gurus,
    As per the requirment we are using a user exit SAVE SALE ORDER PREPARE for BOM purpose to reconfirm the confirmation qty.
    Now we need to add one more logic in the same user exit, which will run the availabilty check run for each of the line items of the BOM and consider latest confirmation qty from it. So my concern is it possible that we can call the availabilty check run event with in the user exit SAVE SALE ORDER PREPARE or this not advisable?
    Please let me know..
      Regards,
      Babs

    HI Venkat,
    Thanks for your reply.Yes you are right availability check runs automatically at sub item level.
    But please note the customer requirment iteself is is little different from std BOM configuration.
    Currently the availabilty check is activated both at header and sub item level. They are maintaining the stock for header and sub item level.Also the these sub items are some time being sold as invidual materials. hence there exist a mismatch in the stock value between header and sub items.
    when a sales order is created both header and sub items will have confirmation with different value between each and the same mismatched values are being passed in to delivery. But the deliveries can not be processed for PGI because of the mismatched confirmation qty between header and item level.
    I guess now you the rrequirment.
    So we are using the SAVE SALE ORDER exit which will re check the confirmed qty between header and item and takes lowest confirmed qty and change the confirmed quantities from all the line items to lowest one, so that confirmation qty among all the line items are same. This is the first logic we are planning.
    Further there is one more additional process BOP need to be run for this header and sub items, which will change the confirmed qty based on the latest stock for individual line item. even in this case also the user exit SAVE Sale order is being called but we need to run the availability check run additionally because of which our requirment will be taken care.
    Regards,
    Babs

  • Time and event-based jobs

    Jobs scheduled based on time in DBMS_SCHEDULER. Can we changed to event-based without dropping the job?
    Thanks in advance.

    Hi,
    You can try this :
    - disable the job
    - set event_spec to be NULL for the job e.g.
    exec dbms_scheduler.set_attribute_null('j1','event_spec')
    - use set_attribute to set your time-based schedule
    - re-enable the job
    This should work.
    Hope this helps,
    Ravi.

  • Long Running Jobs based on average time of last 5 run

    Hi Experts,
    I need a query to find out the Long Running Jobs, based on average time of last 5 run.
    Could you please help me.
    Thanks in advance. 
    --------------------------------- Devender Bijania

    SELECT 
        [sJOB].[name] AS [JobName]
        , CASE 
            WHEN [sJOBH].[run_date] IS NULL OR [sJOBH].[run_time] IS NULL THEN NULL
            ELSE CAST(
                    CAST([sJOBH].[run_date] AS CHAR(8))
                    + ' ' 
                    + STUFF(
                        STUFF(RIGHT('000000' + CAST([sJOBH].[run_time] AS VARCHAR(6)),  6)
                            , 3, 0, ':')
                        , 6, 0, ':')
                    AS DATETIME)
          END AS [LastRunDateTime]
        , CASE [sJOBH].[run_status]
            WHEN 0 THEN 'Failed'
            WHEN 1 THEN 'Succeeded'
            WHEN 2 THEN 'Retry'
            WHEN 3 THEN 'Canceled'
            WHEN 4 THEN 'Running' -- In Progress
          END AS [LastRunStatus]
        , STUFF(
                STUFF(RIGHT('000000' + CAST([sJOBH].[run_duration] AS VARCHAR(6)),  6)
                    , 3, 0, ':')
                , 6, 0, ':') 
            AS [LastRunDuration (HH:MM:SS)]
          , CASE [sJOBSCH].[NextRunDate]
            WHEN 0 THEN NULL
            ELSE CAST(
                    CAST([sJOBSCH].[NextRunDate] AS CHAR(8))
                    + ' ' 
                    + STUFF(
                        STUFF(RIGHT('000000' + CAST([sJOBSCH].[NextRunTime] AS VARCHAR(6)),  6)
                            , 3, 0, ':')
                        , 6, 0, ':')
                    AS DATETIME)
          END AS [NextRunDateTime]
    FROM 
        [msdb].[dbo].[sysjobs] AS [sJOB]
        LEFT JOIN (
                    SELECT
                        [job_id]
                        , MIN([next_run_date]) AS [NextRunDate]
                        , MIN([next_run_time]) AS [NextRunTime]
                    FROM [msdb].[dbo].[sysjobschedules]
                    GROUP BY [job_id]
                ) AS [sJOBSCH]
            ON [sJOB].[job_id] = [sJOBSCH].[job_id]
        LEFT JOIN (
                    SELECT 
                        [job_id]
                        , [run_date]
                        , [run_time]
                        , [run_status]
                        , [run_duration]
                        , [message]
                        , ROW_NUMBER() OVER (
                                                PARTITION BY [job_id] 
                                                ORDER BY [run_date] DESC, [run_time] DESC
                          ) AS RowNumber
                    FROM [msdb].[dbo].[sysjobhistory]
                    WHERE [step_id] = 0
                ) AS [sJOBH]
            ON [sJOB].[job_id] = [sJOBH].[job_id]
            AND [sJOBH].[RowNumber] = 1
    ORDER BY [LastRunDateTime] desc,
             [LastRunDuration (HH:MM:SS)] DESC
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • How to run a particular case continuously in event based state machine architecture.

    I am making a program using event based state machine architecture, it is running as expected whenever i am generating an event, case structure corresponding to that event executes.
    we are taking some measurements from oscilloscope e.g. i am having one boolean button for rise time whenever i am pressing that that button it displays the value of rise time, it displays only once( since i have generated an event on that boolean button so it executes only once and displays value for one time and then comeback to timeout state) but in our program what we want, we want it to update value continously once that button is pressed.
    Now for a time being i have placed while loop on the case corresponding to rise time but this is not the right approach.
    since i am using state machine architecture( event based ), i am not getting how to run particular case continuously ,or if there is any other better architecture that i can use to implement the same application.
    Attached below is the program.
    Attachments:
    OScilloscope .zip ‏108 KB

    Say, in the attached program, when the user selects Autoset, it inserts corresponding state (Autoset) and now if you want this state to run again and again, probbbly you can again insert Autoset state while executing Autoset state... ohhh its confusing... check the picture below (A picture is worth a thousand words):
    1. Based on user selection, insert Autoset state.
    2. Re-insert Autoset state again and again while executing Autoset state.
    3. Now to come out of this loop, based on appropriate event generation, insert any other state AT FRONT (equivalent to Enqueue Element At Opposite End).
    I am not allergic to Kudos, in fact I love Kudos.
     Make your LabVIEW experience more CONVENIENT.

  • The Data Access service is either not running or not yet initialized. Check the event log for more information

    Hi,
    I have SCSM with remote SQL and the SCSM Management server give below error
    Message: Failed to connect to server ‘Name of Server’
    Microsoft.EnterpriseManagement.Common.ServiceNotRunningException: The Data Access service is either not running or not yet initialized. Check the event log for more information. —> System.ServiceModel.EndpointNotFoundException: Could not connect to net.tcp://ServerName:5724/DispatcherService.
    The connection attempt lasted for a time span of 00:00:04.0070932. TCP error code 10061: No connection could be made because the target machine actively refused it IPAddress:5724.  —> System.Net.Sockets.SocketException: No connection could be made
    because the target machine actively refused it IPAddress:5724
    I had try to restart SQL & MS with same error,
    Also i had try the following
    https://social.technet.microsoft.com/Forums/systemcenter/en-US/c670d54d-3a92-481f-8dc9-55c475ad196f/problems-with-data-access-service-after-rebooting
    https://social.technet.microsoft.com/Forums/systemcenter/en-US/26dc1d5c-fa82-403f-8949-3073f3b82a60/the-data-access-service-is-either-not-running-or-not-yet-initialized
    Not help meRegards

    I had same error before 
    below steps to solve it
    Make sure SQL Server Running & ServiceManager Database not full
    Stop All SCSM Services,
               System Center Management Configuration
       Microsoft System Center Data Access Service.
       Microsoft Monitoring Agent
    Rename Health Service State to Health Service State_old --- @ "C:\Program Files\Microsoft System Center 2012 R2\Service Manager"
    Start SCSM Services
        Microsoft Monitoring Agent
               System Center Management Configuration
       Microsoft System Center Data Access Service.
    Wait 2 min...
    check Event Viewer... 
    hope this help you.
    Regards, Ibrahim Hamdy

  • SCOM2012 R2 The Data Access service is either not running or not yet initialized check the event log

    Can U guys tell me the solution of it i am using scom 2012 R2 with sql server 2012 High availability solution
    Failed to connect to server
    The Data Access service is either not running or not yet initialized check the event log
    Date: 5/6/2014 5:27:49 PM
    Application: Operations Manager
    Application Version: 7.1.10226.0
    Severity: Error
    Message: Failed to connect to server 'PPLKHIHOV23.ppl.com.pk'
    Microsoft.EnterpriseManagement.Common.ServiceNotRunningException: The Data Access service is either not running or not yet initialized. Check the event log for more information. ---> System.ServiceModel.EndpointNotFoundException: Could not connect to
    net.tcp://pplkhihov23.ppl.com.pk:5724/DispatcherService. The connection attempt lasted for a time span of 00:00:02.0020292. TCP error code 10061: No connection could be made because the target machine actively refused it 172.16.0.107:5724.  ---> System.Net.Sockets.SocketException:
    No connection could be made because the target machine actively refused it 172.16.0.107:5724
       at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
       at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
       at System.ServiceModel.Channels.SocketConnectionInitiator.Connect(Uri uri, TimeSpan timeout)
       --- End of inner exception stack trace ---
    Server stack trace:
       at System.ServiceModel.Channels.SocketConnectionInitiator.Connect(Uri uri, TimeSpan timeout)
       at System.ServiceModel.Channels.BufferedConnectionInitiator.Connect(Uri uri, TimeSpan timeout)
       at System.ServiceModel.Channels.ConnectionPoolHelper.EstablishConnection(TimeSpan timeout)
       at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.OnOpen(TimeSpan timeout)
       at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
       at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan timeout)
       at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannel.CallOnceManager.CallOnce(TimeSpan timeout, CallOnceManager cascade)
       at System.ServiceModel.Channels.ServiceChannel.EnsureOpened(TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
       at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
    Exception rethrown at [0]:
       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
       at Microsoft.EnterpriseManagement.Common.Internal.IDispatcherService.Connect(SdkClientConnectionOptions connectionOptions)
       at Microsoft.EnterpriseManagement.Common.Internal.SdkDataLayerProxyCore.Initialize(EnterpriseManagementConnectionSettings connectionSettings, SdkChannelObject`1 channelObjectDispatcherService)
       at Microsoft.EnterpriseManagement.Common.Internal.SdkDataLayerProxyCore.CreateEndpoint[T](EnterpriseManagementConnectionSettings connectionSettings, SdkChannelObject`1 channelObjectDispatcherService)
       --- End of inner exception stack trace ---
       at Microsoft.EnterpriseManagement.Common.Internal.ExceptionHandlers.HandleChannelExceptions(Exception ex)
       at Microsoft.EnterpriseManagement.Common.Internal.SdkDataLayerProxyCore.CreateEndpoint[T](EnterpriseManagementConnectionSettings connectionSettings, SdkChannelObject`1 channelObjectDispatcherService)
       at Microsoft.EnterpriseManagement.Common.Internal.SdkDataLayerProxyCore.ConstructEnterpriseManagementGroupInternal[T,P](EnterpriseManagementConnectionSettings connectionSettings, ClientDataAccessCore clientCallback)
       at Microsoft.EnterpriseManagement.Common.Internal.SdkDataLayerProxyCore.RetrieveEnterpriseManagementGroupInternal[T,P](EnterpriseManagementConnectionSettings connectionSettings, ClientDataAccessCore callbackDispatcherService)
       at Microsoft.EnterpriseManagement.Common.Internal.SdkDataLayerProxyCore.Connect[T,P](EnterpriseManagementConnectionSettings connectionSettings, ClientDataAccessCore callbackDispatcherService)
       at Microsoft.EnterpriseManagement.ManagementGroup.InternalInitialize(EnterpriseManagementConnectionSettings connectionSettings, ManagementGroupInternal internals)
       at Microsoft.EnterpriseManagement.Mom.Internal.UI.Common.ManagementGroupSessionManager.Connect(String server)
       at Microsoft.EnterpriseManagement.Monitoring.Console.Internal.ConsoleWindowBase.TryConnectToManagementGroupJob(Object sender, ConsoleJobEventArgs args)
    System.ServiceModel.EndpointNotFoundException: Could not connect to net.tcp://pplkhihov23.ppl.com.pk:5724/DispatcherService. The connection attempt lasted for a time span of 00:00:02.0020292. TCP error code 10061: No connection could be made because the target
    machine actively refused it 172.16.0.107:5724.  ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 172.16.0.107:5724
       at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
       at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
       at System.ServiceModel.Channels.SocketConnectionInitiator.Connect(Uri uri, TimeSpan timeout)
       --- End of inner exception stack trace ---
    Server stack trace:
       at System.ServiceModel.Channels.SocketConnectionInitiator.Connect(Uri uri, TimeSpan timeout)
       at System.ServiceModel.Channels.BufferedConnectionInitiator.Connect(Uri uri, TimeSpan timeout)
       at System.ServiceModel.Channels.ConnectionPoolHelper.EstablishConnection(TimeSpan timeout)
       at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.OnOpen(TimeSpan timeout)
       at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
       at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan timeout)
       at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannel.CallOnceManager.CallOnce(TimeSpan timeout, CallOnceManager cascade)
       at System.ServiceModel.Channels.ServiceChannel.EnsureOpened(TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
       at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
    Exception rethrown at [0]:
       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
       at Microsoft.EnterpriseManagement.Common.Internal.IDispatcherService.Connect(SdkClientConnectionOptions connectionOptions)
       at Microsoft.EnterpriseManagement.Common.Internal.SdkDataLayerProxyCore.Initialize(EnterpriseManagementConnectionSettings connectionSettings, SdkChannelObject`1 channelObjectDispatcherService)
       at Microsoft.EnterpriseManagement.Common.Internal.SdkDataLayerProxyCore.CreateEndpoint[T](EnterpriseManagementConnectionSettings connectionSettings, SdkChannelObject`1 channelObjectDispatcherService)
    System.Net.Sockets.SocketException (0x80004005): No connection could be made because the target machine actively refused it 172.16.0.107:5724
       at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
       at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
       at System.ServiceModel.Channels.SocketConnectionInitiator.Connect(Uri uri, TimeSpan timeout)

    Get "System Center Data Access Service" is running Automatic not manual and verify that SQL server is running and connectivity between SCOM and SQL is up and not slow for any application run on background.
    To make sure that no application take utilize connectivity between SQL and SCOM. Try to restart SQL and SCOM and check again.
    Please remember, if you see a post that helped you please click "Vote As Helpful" and if it answered your question, please click "Mark As Answer"
    Mai Ali | My blog: Technical | Twitter:
    Mai Ali

  • Event based decision

    Hi every one,
    I am working with jcaps 5.1.3.
    I am doing a business process to implement timer event, following user guide of eDesigner on page 63.
    I want to receive a message on my business process and do anything whit this message, but I want to control timeout while.
    I use a event based decision, but when I build my project I get next error:
    I test my business process and I found this error is generated when I configure event based decision (message event).
    Have everyone an example How implement a timeout on a bussiness process?
    Thanks on advanced,
    conhector
    com.stc.codegen.framework.model.CodeGenException: code generation error at = initializingnull
    at com.stc.codegen.frameworkImpl.model.CodeGenFrameworkImpl.process(CodeGenFrameworkImpl.java:1567)
    at com.stc.codegen.frameworkImpl.model.DeploymentVisitorImpl.process(DeploymentVisitorImpl.java:405)
    at com.stc.codegen.frameworkImpl.model.DeploymentVisitorImpl.process(DeploymentVisitorImpl.java:308)
    at com.stc.codegen.frameworkImpl.model.DeploymentVisitorImpl.traverseDeployment(DeploymentVisitorImpl.java:268)
    at com.stc.codegen.driver.module.DeploymentBuildAction.loadCodeGen(DeploymentBuildAction.java:923)
    at com.stc.codegen.driver.module.DeploymentBuildAction.access$1000(DeploymentBuildAction.java:174)
    at com.stc.codegen.driver.module.DeploymentBuildAction$1.run(DeploymentBuildAction.java:599)
    at org.openide.util.Task.run(Task.java:136)
    at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:599)
    Caused by: java.lang.ClassCastException
    at com.stc.codegen.eInsightImpl.model.EInsightCodelet.validatePorts(EInsightCodelet.java:1597)
    at com.stc.codegen.eInsightImpl.model.EInsightCodelet.validate(EInsightCodelet.java:1567)
    at com.stc.codegen.frameworkImpl.model.CodeGenFrameworkImpl.validateCodelets(CodeGenFrameworkImpl.java:1049)
    at com.stc.codegen.frameworkImpl.model.CodeGenFrameworkImpl.process(CodeGenFrameworkImpl.java:1542)
    ... 8 more

    Hello,
    i become acquainted with JavaCAPS at the moment.
    Working with the JavaCAPS Tutorial v2.1, i´m having the same problem like conector.
    Trying to built the EAR file in project 4 (Viewing store data), CAPS throws an exception named "code generation error at = initializingnull".
    I checked the corresponding connectivity map but everything seems to be ok.
    Exception:
    code generation error at = initializingnullError details:
    com.stc.codegen.framework.model.CodeGenException: code generation error at = initializingnull
         at com.stc.codegen.frameworkImpl.model.CodeGenFrameworkImpl.process(CodeGenFrameworkImpl.java:1567)
         at com.stc.codegen.frameworkImpl.model.DeploymentVisitorImpl.process(DeploymentVisitorImpl.java:405)
         at com.stc.codegen.frameworkImpl.model.DeploymentVisitorImpl.process(DeploymentVisitorImpl.java:308)
         at com.stc.codegen.frameworkImpl.model.DeploymentVisitorImpl.traverseDeployment(DeploymentVisitorImpl.java:268)
         at com.stc.codegen.driver.module.DeploymentBuildAction.loadCodeGen(DeploymentBuildAction.java:923)
         at com.stc.codegen.driver.module.DeploymentBuildAction.access$1000(DeploymentBuildAction.java:174)
         at com.stc.codegen.driver.module.DeploymentBuildAction$1.run(DeploymentBuildAction.java:599)
         at org.openide.util.Task.run(Task.java:136)
         at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:599)
    Caused by: java.lang.ClassCastException
         at com.stc.codegen.eInsightImpl.model.EInsightCodelet.validatePorts(EInsightCodelet.java:1597)
         at com.stc.codegen.eInsightImpl.model.EInsightCodelet.validate(EInsightCodelet.java:1567)
         at com.stc.codegen.frameworkImpl.model.CodeGenFrameworkImpl.validateCodelets(CodeGenFrameworkImpl.java:1049)
         at com.stc.codegen.frameworkImpl.model.CodeGenFrameworkImpl.process(CodeGenFrameworkImpl.java:1542)
         ... 8 moreFor help i would be deeply grateful!
    Thanks.

  • Scheduler - Event Based Jobs

    Hi,
    I've been trying to create an event based job dependent on multiple jobs. I tried queuing, but it seems like it can only hand one Job at a time. Also, chains were recommended to me, but I want the Job to run on the dependence on the Job that ran on specific program at the specific time. I currently know that chains can only handle, programs, other chains and/or events.
    In my mind chains wouldn't work, because If I wanted to run Job3 dependent on the outcome of Job1 running Program1 and Job2 running Program2, chains wouldn't be able to accomdate that. For it to happen in chains I would have to attach Program1 and Program2 to the new chain Job and that is not exactly what I would want.
    Can anyone help/clarify this situation for me. Thank you.
    Tony

    Hi Tony,
    So the requirement is to run a job after 2 prior jobs have completed.
    There are two ways I can think of to do this, both using events. In both cases you need to set job A and job B to raise events on completion (succeeded, failed or stopped) and setup an agent for the Scheduler event queue in the schema in which you are working
    dbms_scheduler.add_event_queue_subscriber('myagent')
    In order to get Job C to start after jobs A and B have completed there are 2 options.
    1) Let job C point to a chain and start running whenever job A has completed. The chain will have 2 steps, one event step waiting on B and one that runs your task C. An event step does nothing but wait for a particular event and complete successfully when the event is received. The second step will run when the event step waiting on job B has completed.
    So your chain would look something like
    begin
    dbms_scheduler.create_chain('chain1');
    dbms_scheduler.define_chain_event_step('chain1','stepB',
    'tab.user_data.object_name = ''JOB_B'' and
    tab.user_data.event_type IN(''JOB_SUCCEEDED'',''JOB_FAILED'',''JOB_STOPPED''',
    'sys.scheduler$_event_queue,myagent');
    dbms_scheduler.define_chain_step('chain1','stepC','finalTaskProg');
    dbms_scheduler.define_chain_rule('chain1','true','start stepB');
    dbms_scheduler.define_chain_rule('chain1', 'stepB completed', 'start stepC');
    dbms_scheduler.define_chain_rule('chain1', 'stepC completed', 'end');
    dbms_scheduler.enable('chain1');
    end;
    And your job would point to the chain and run whenever job_A completes (similar condition and queue_spec). It would keep waiting till job_B runs and then the final task would run and it would complete.
    2) The second way is to require job_A to insert a row into a table somewhere. Rule conditions can access table data so you could have job_C have an event condition which checks for a completion event for job_B and checks the table to see whether job_A has completed. Then the code you run should then remove the row in the table
    e.g.
    queue_spec=>'sys.scheduler$_event_queue,myagent'
    event_condition=>'tab.user_data.object_name = ''JOB_B'' and
    tab.user_data.event_type IN(''JOB_SUCCEEDED'',''JOB_FAILED'',''JOB_STOPPED''' and
    (select count(*) from mytab where col='job_A')>0'
    Then when running C do - delete from mytab where col='job_a';
    Both of these assume that job_A always completes before job_B but both of these will then run job_C after job_B completes. Modifying either of these so that either job A or B runs first is also possible by having another job that waits on A rather than B.
    Hope this helps, if you have any more questions, let me know.
    -Ravi

  • How to create event based process chains

    Hi All,
    I would like to know about event based process chains. In connection to this, could you please answer the following queries,
    1. How to create events
    2. How to link created event to the process chain in the same BI or BW system and as well as from  
        externel BI system.
    3. How link one process chain with other process chain (i.e, After completion of one process chain, it
        should trigger other dependent process chain)
    Thanks and Regards,
    Kotesh.

    1). Doubt regarding first question.
    For example, i would like to create time based event (it should be trigger daily at specified time),
    where we have to maintain scheduling options while creating event.
    When i checked SM62 there i found only two options a). Event name and b). Description.
    Could please send any doucument link if you have.
    Ans : You can use function modules like "BP_EVENT_RAISE" in a program and schedule the program to trigger.
    2). For externel BIW system also same procedure we need to follow or any difference.
    Ans : Externally you need to trigger the same event.
    3). i found dependent process chain also had scheduling options as direct scheduling insted of start using meta chain or API. As you said dependent process chain should be mata chain. it seems dependent process chain may be Meta chain or Direct scheduilg.
    Ans : Its your choice how you want to schedule it.You can either make that dependent chain a metachain or schedule it separately.
    I found at the end of first process chain they kept one process like Raise event and second process chain connected with the help of raise event process event name. If you have any idea about this process could explain a bit more.
    Ans : May be they are raising the event in the main chain and triggering the dependent chain using this event.
    But Metachain is preferred for such thing.Though it does similar thing.
    Hope this helps.

  • Event based monitoring for xmonad

    I am using a conky + dzen2 status bar and xmonad DynamicLog hook for monitoring.
    What I am looking for is something event based not like conky which runs all the time or at a given interval.
    As an example, volume of the audio system. I want to display it continuously but I want to change the display only when it changes. Another example would be keyboard layout.
    Any idea ?
    regards,
    Hardik
    Last edited by rangalo (2010-05-31 20:37:26)

    Hi,
    i`ll recommend you post your Question in the Data Services Space.
    Data Services and Data Quality
    Regards
    -Seb.

  • Events Based Scheduling

    Database Ver. 11gR2 (11.2.0.2.0)
    Hi Guys,
    How do you run jobs in oracle scheduler based on events? I have a job that needs to run after the successful completion of another job. I don't want to use chains. I have searched on the web, but all the examples I see are where a temp table is created and a row is inserted and then another PL/SQL block is run to manually pass a 'GO' value. I am looking for the a job to raise the JOB_SUCCEEDED event and then another job kicks in based on this event.
    Any detailed examples would be greatly appreciated. Also if using any other PL/SQL package, what necessary privileges would be required to execute that package.
    Thanks in advance.
    VB

    Here is a simple example. You create a job, MY_JOB, that raises the job_succeeded event. You also create an event-based job, MY_JOB_CONSUMER, that consumes event messages from sys.scheduler$_event_queue but only for job_succeeded events raised by MY_JOB.
    First you let the user subscribe to the Scheduler event queue using the ADD_EVENT_QUEUE_SUBSCRIBER procedure. “my_agent”, or whatever name you use, is the name of the Oracle Streams Advanced Queuing (AQ) agent to be used to subscribe to the Scheduler event queue. This call both creates a subscription to the Scheduler event queue and grants the user permission to dequeue using the designated agent. The subscription is rule-based. The rule permits the user to see only events raised by jobs that the user owns, and filters out all other messages:
    DECLARE
       agent_already_subscribed_exp   EXCEPTION;
       PRAGMA EXCEPTION_INIT (agent_already_subscribed_exp, -24034);
    BEGIN
       sys.DBMS_SCHEDULER.add_event_queue_subscriber ('my_agent');
    EXCEPTION
       WHEN agent_already_subscribed_exp
       THEN
          NULL;
    END;
    /Then you create MY_JOB_CONSUMER:
    BEGIN
       sys.DBMS_SCHEDULER.create_job (
          job_name          => 'MY_JOB_CONSUMER',
          job_type          => 'PLSQL_BLOCK',
          job_action        => '/* Add you code here */ NULL;',
          event_condition   => 'tab.user_data.event_type = ''JOB_SUCCEEDED'' and tab.user_data.object_name = ''MY_JOB''',
          queue_spec        => 'sys.scheduler$_event_queue,my_agent',
          enabled           => TRUE);
    END;
    /Now, MY_JOB_CONSUMER is waiting for a message to arrive in sys.scheduler$_event_queue. It will dequeue it only if the condition in event_condition is true.
    Create a one time job, MY_JOB, set its raise_events attribute to job_succeeded and enable it:
    BEGIN
       sys.DBMS_SCHEDULER.create_job (job_name     => 'MY_JOB',
                                      job_type     => 'PLSQL_BLOCK',
                                      job_action   => '/* Add you code here */ NULL;',
                                      start_date   => SYSTIMESTAMP AT TIME ZONE 'US/Pacific',
                                      auto_drop    => TRUE,
                                      enabled      => FALSE);
       DBMS_SCHEDULER.set_attribute ('MY_JOB', 'raise_events', DBMS_SCHEDULER.job_succeeded);
       sys.DBMS_SCHEDULER.enable ('MY_JOB');
    END;
    /When MY_JOB executes, it will enqueue a message in sys.scheduler$_event_queue. MY_JOB_CONSUMER will then pick it up and consume it.
    Hope that simple demonstration helps.

  • How to limit the number of parallel instances of a given event-based job?

    Hi,
    DB version : 11.2.0.3
    I'm using an event-based job with parallel_instances attribute set to true.
    It works perfectly fine, messages are enqueued then dequeued and processed simultaneously by separate instances of the same job.
    Now, I'd like to limit the number of parallel instances of this job running at the same time, say to an arbitrary number n.
    What would be the best way to do that?
    Maybe using a notification callback is a better option in this case?
    Thanks in advance for any input.

    Hi,
    DB version : 11.2.0.3
    I'm using an event-based job with parallel_instances attribute set to true.
    It works perfectly fine, messages are enqueued then dequeued and processed simultaneously by separate instances of the same job.
    Now, I'd like to limit the number of parallel instances of this job running at the same time, say to an arbitrary number n.
    What would be the best way to do that?
    Maybe using a notification callback is a better option in this case?
    Thanks in advance for any input.

  • How to do running aggr based on prompt value and how to or prompt?

    Hello guys
    I have some requirements that I have a report that has measures and Months and Date..
    1. I have to create dashboard prompts on months and dates in such way that users can select either that want to see monthly sales or daily sales.. So the two prompts should be "or" relationship that point to the same report. If user select month from month prompt, the report will return data at monthly level; if select day on day prompt, it should return data at day level..
    2. Doing running sum based on the dates selected from the prompts.
    If I select day prompt as between "Feb 12th 2009" and "March 1st 2009", the report should return sales data that is the sum of all sales between "Feb 12th 2009" and "March 1st 2009".. If user select month prompt as between "Nov 2008" and "Feb 2009", the report should show the sum of all the sales from "Nov 2008" and "Feb 2009".
    How would I achieve both scenarios?
    Any pointer will be greatly appreciated..

    Hi.
    Maybe you want to have dynamic group by in Answers report by choosing group by part from a dashboard prompt.
    So, assume this example in which you have only one dashboard prompt that shows Day or Month character data.
    Make dashboard prompt:
    edit column formula: 1
    control: drop-down list
    show:
    SELECT case when 1=2 then TIMES.CALENDAR_MONTH_DESC else *'Day'* end FROM "Normal model"
    union all
    SELECT case when 1=2 then TIMES.CALENDAR_MONTH_DESC else *'Month'* end FROM "Normal model"
    default to - specified value: Day
    set variable - presentation variable: pv_dyn_group_by
    label: Group by
    Now make report in Answers and we'll use dynamic column for group by depends on our presentation variable (Day or Month):
    /* column 1 */
    label:
    I don't know how to dynamicly change column label (Month or Day) so I put just label Dynamic group by.
    column formula:
    case when '@{pv_dyn_group_by}' ='Day'
    then EVALUATE('TO_CHAR(%1,%2)' as varchar(20), TIMES.TIME_ID, 'dd.mm.yyyy')
    else TIMES.CALENDAR_MONTH_DESC
    end
    /* column 2 */
    AMOUNT_SOLD
    /* column 3 */
    RSUM(AMOUNT_SOLD)
    Test:
    In both cases we get the same result of RSUM in the end. First we group by a TIMES.TIME_ID if we choose 'Day', second by a TIMES.CALENDAR_MONTH_DESC if we choose 'Month'.
    Is that you want to?
    So if you want to see month or day values to choose it (between part) you must make second prompt with something like this in show SQL results:
    SELECT case when '@{pv_dyn_group_by}{Month}'='Month' then TIMES.CALENDAR_MONTH_DESC end || case when '@{pv_dyn_group_by}{Day}'='Day' then EVALUATE('TO_CHAR(%1,%2)' as varchar(20), TIMES.TIME_ID, 'dd.mm.yyyy') end FROM "Normal model" order by 1
    The name of the second prompt is: '@{pv_filter}{Month}'
    That will display 'Month' or 'Day'. I don't know better solution :-)
    Similar is to make a between 2 prompts.
    After then you must modify filter in Answers to get OR (between dates ot between months)
    Regards,
    Goran Ocko
    http://108obiee.blogspot.com/

  • I need help with my event-based cue points with audio

    Im having trouble with my video game project for my action script 3 class at school. Here is what i did, i made a game called Tailgate toss up. I filmed my character and rendered it in Adobe Premiere. I than brought my .mov file into After Effects and I put event-based cue points-
    my first cue point at 0:00:03:13 called "loop"
    my second cue point at 00:00:03:27 called "draw"
    my third cue point at 00:00:05:24 called "bang"
    my fourth cue point at 00:00:13:29 called "dead"
    my fifth cue point at 00:00:14:29 called "You Lose"
    my last cue point at 00:00:19:14 called "End"
    Here is my action script 3 code
    ///first frame:
    start_btn.addEventListener(MouseEvent.CLICK, startGame);
    function startGame(event:MouseEvent){
    gotoAndStop(2);
    SoundMixer.stopAll()
    stop();
    ///second frame:
    stop();
    var loopTime
    var hitHim:Boolean = false;
    var vConnection:NetConnection = new NetConnection();
    vConnection.connect(null);
    var vStream:NetStream = new NetStream(vConnection);
    var client:Object = new Object();
    client.onCuePoint = onCuePoint;
    vStream.client = client;
    var myVideo:Video = new Video(418, 480);
    myVideo.y = 0;  ///this adjusts where the video is, right now it is the size of the canvas which is 418,480
    addChild(myVideo);
    myVideo.attachNetStream(vStream);
    vStream.play("michelle.flv");
    var throw_bottle:Sound
    throw_bottle = new Sound(new URLRequest("audio/throw_bottle.mp3")); //change to button noise, will add sound into ae file
    target_mc.addEventListener(MouseEvent.CLICK, shoot);
    target_mc.buttonMode = true;
    target_mc.visible = false;
    draw_mc.visible = false;
    function onCuePoint(cuePoint:Object):void {
       if(cuePoint.name == "loop"){
    loopTime = cuePoint.time;
        if(cuePoint.name == "draw"){
    var randomLoop:Number = Math.random()*10;
    if(randomLoop > 2){
    vStream.seek(loopTime);
    }else{
    setChildIndex(target_mc, numChildren - 1);  
    setChildIndex(draw_mc, numChildren - 1);    
    target_mc.visible = true;
    draw_mc.visible = true;
    if(cuePoint.time == "5:24"){
    draw_mc.visible = false;
    target_mc.visible = false;
    if(!hitHim){
    vStream.seek(15);    
    if(cuePoint.name == "dead"){
    vStream.close();
    myVideo.clear();
    gotoAndStop(3);
    if(cuePoint.name == "end"){
    gotoAndStop(3);
    function shoot(event:MouseEvent){
    throw_bottle.play();
    hitHim = true;
    ///my third and last frame
    playAgain_btn.addEventListener(MouseEvent.CLICK, playAgain);
    function playAgain(event:MouseEvent){
    gotoAndStop(2);
    SoundMixer.stopAll()
    stop();
    When I have no audio it works perfectly, no problems. When I bring audio in i re-render it as a .mov file and bring it back into After Effects and add the cue points to it. Than i re-render it out again as a flv file. When i bring it into my flash project it will work when the looping variable does just one loop and my target will appear so you can click on it or not. But when the looping variable makes it loop 2 to 10 times it skips over the catching (the part of the clip if you clip the button) and goes directly to the dropping of the can, not giving you the option of clicking the button. So basically it skips the "draw" or second cue point of my game and goes to "You Lose" cue point.
    Any suggestions?

    Hi,
    The latest audio driver for your machine is on the following link.
    http://ftp.hp.com/pub/softpaq/sp59501-60000/sp59649.exe
    Regards,
    DP-K
    ****Click the White thumb to say thanks****
    ****Please mark Accept As Solution if it solves your problem****
    ****I don't work for HP****
    Microsoft MVP - Windows Experience

Maybe you are looking for

  • How to call the built in functions from flex?

    I want to use some of the Built in functions like the twelvesprints.getActivityOwnerId() in flex. From the java example i could make out that we needed to import some classes to do this but was unable to find them for flex.

  • Cannot download latest update...help?

    I can download the update but as soon as I hit "run" a dialogue box appears that says "Instalshield" in the top left corner and then has a bunch of command line perameters with an "ok" button at the button...I hit ok and nothing happens...help?

  • Using adapter kit in Sweden?

    Hi, Why doesn't Apple have a more complete list of countries in its "World Travel Adapter Kit"? I couldn't even find such a list on this web site. I will be in Sweden later this month. Does anyone know if I will have the right adapter for my iBook G4

  • Photoshop elements compared to old photoshop 7?

    Hi, I've just updated my macbook pro, and cant put my old photshop 7 onto it.  really cant warrent spending on the expensive version of photoshop, so am thinking of elements.   So, just wanted to see if anyone could help with a few questions.  All i

  • HPLJ 4250 service manual

    How can I get a service manual for the HPLJ4250 printer? I have searched the HP site and cannot find one to download or to buy.  Any help appreciated.