Java Automation Scheduler Timer

Hi Guys,
I having a trouble, currently i'm assigned to do a background automation that would check the new record in the database every weekdays except friday, and if the application detects a new database it would start the external application.
The checking of database class is already finished, the database class would use the OCI driver of oracle and JDBC to connect to oracle database, and Runtime class for invoking the external applicaitons.
Now the problem is we need to integrate this classes/components, but the real problem is that a class that would schedule the task.
I already look in to the java.util.Timer and java.util.TimerTask and the flux in the simscomputing.com, could you please help me out.

Hi,
Timer and TimerTask can be effectively used to achieve this.
Write a new Class TimerTaskImpl which extends TimeTask. In the run method instantiate the "Database Checking class Object" and call the appropriate method on the object. The Timer Object would create new threads as per the schedule information. To stop the scheduled process from happening on "Fridays", check has to be done in TimerTaskImpl's run method.
Hope this helps
I have a working sample if you want it pls mail me.
Chidda

Similar Messages

  • Handling exception logging in a Java task scheduler program?

    I need to design a Task Scheduler Where
    1) User should be able to schedule multiple task at the same time.
    2) There should be proper error handling on failure of any task and should not affect the other running tasks.
    I found the related programme at http://www.roseindia.net/java/example/java/util/CertainAndRepeatTime.shtml
    My concern is about handling of point 2 in program provided at above link. Say I schedule a recurring mail send process in above program which will be run first time on 12 september 2011 at 2 am, and will be repeated after every 2 hours Say a one process fais at 8 am. I want to log it in log file with task name and time details. Now if I look at above programme i.e CertainAndRepeatTime.java. This program will exit once it schedules all the tasks. Where and how should handle the logging?
    Posted at http://stackoverflow.com/questions/7377204/handling-exception-logging-in-a-java-task-scheduler-program but folks suggesting Quartz scheduler . My Limitation is that i can't for quartz because my project allows me to use only standard java library. Is there any way we can handle logging in the same programme in case of exception.

    Well, first of all I wouldn't trust any code from roseindia. So you might want to look for more reliable advice.
    As for your logging, you can add it for example to the TimerTask itself. I don't recommend adding logging to that roseindia cr*p though.

  • Automatically turn filters on or off at a scheduled time

    Hi there,
    Is it possible for a Blackberry (I have a 9780)  to automatically turn email filters on or off at a scheduled time during night? 
    This is to allow alerting notification start without me having to manually do it.  (I'll be asleep )
    (I want to turn on alerting at say, 5am but not wake up until say 7am)
    Thanks

    Hi Everyone,
    I was wondering if anyone can help me figure out how
    to turn on and off the XRAID at a specific time. My
    electrical bills are crazy. Is there a way to get
    this done?
    Thanks,
    Jorge
    I think turning the RAID on and off periodically is a bad idea. But if you really really really want to do this ....
    Connect the xserve raid to a 'metered power strip such as those provide by APC. you can telnet to the power strip via the network to power off individual port)
    write a script (run on the xserve or powermac that the RAID is connected to (direct or via switch)
    0) quit application (issue a quit command or if the application have a stop command (example databse can be stopped)
    1) unmount volume (must)
    2) issue a telnet command via expect script to control the power strip to power off the array.
    If you have java cli access to the array (see alienraid.org).(I have not tried this before.)
    http://alienraid.org/article.php?story=xserveraidtools12&query=command
    You can issue a command to execute the RAID admin shutdown command.
    Put the master script into a unix cron job.
    macbook pro   Mac OS X (10.4.7)   typing this on a white box pc

  • To run my functional script in schedule times

    Hi
    This is ravi.
    I prepared one functional script using OATS. Then i want to run that script after some time.I want to put some schedule time to run that script .I have searched in the tool but i am unable to find the solution...can any please help me regarding this issue??
    Thanks in advance
    Edited by: 838740 on Feb 22, 2011 4:15 AM

    Hi we have created OATS ADF loadtesting script.. would like to know how we can run Loadtest in command line mode or schedule multiple LOAD test
    c:\oracleats\openscript\runscript.bat
    -- this will run only Open Script - single user
    OTM
    -- is letting me only to schedule functional tests not load tests
    please let us know if there is any way to schedule load test which will hel in automating our entire test env.
    Thanks
    Joseph

  • How to power on Mac Mini at scheduled time ?

    Is there any way I can get my Mini Mac to power itself on at a scheduled time of day ?
    Then when it powers on, I want to execute a program, how's that done too ?
    Thanks for any help.
    Kind regards
    Dan
    Mac Mini   Mac OS X (10.4.3)  

    Hello dfreer. In the Energy Saver Preference Pane in System Preferences, you can schedule your mini to wake from sleep or startup at a scheduled time every day by clicking the "Schedule" button.
    To start a program at startup, just go into the Accounts Preference Pane, and click the "Login Items" to add an application to open automatically at startup. To do anything fancier with this application when it opens, you might need to look at Automator or Applescript.

  • Is there a way to speed up the "Java Loading" screen time?

    Hi.
    I'm having a big problem with that. I'm running the JRE 1.6u3 on Windows XP SP 2, on an AMD Athlon 64 X2 Dual 3800+ (2GB of RAM), and the "Java Loading" screen time of web started apps is too high (about 15 seconds when I just restarted the pc, and 10 seconds after the first load... is that right?).
    What Web Start do when it is "loading" ? The loading time of a standard client VM is pretty faster (like, uh, 1/4 second?).
    Thanks.
    Hidralisk

    The Java Loading splash is only shown untill the Main class of java web start is invoked and can put up the download progress dialog. I don't know why it would be so sow, but this should be improved by the Java Quick Start featurew put in jdk 6u10 (see http://download.java.net/jdk6/)
    the bug 6506138 has been escallated and is being vigorously investigated. (it would probably pertain more to the time durring which the download progress window is shown or beyond)
    /Andy

  • Scheduling Time in process order

    Dear All
    While creating process order system is not picking scheduling time as per maintained in recipe because of this capacity is not being load on WC & showing zero reqmnt. Whreas date are properly calculating as per inhouse time maintained. In OPUZ i had ticked both scheduling & capacity reqmnt.
    In resource i had maintained all parameter in capacity & capacity is showing as 24 Hr. Scheduling & Capacity fromula had aslo maintain. Wht could be other reason for nt calculating time as per recipe.
    Thanks & regards

    Rashid,
    So is the dates getting populated correctly after scheduing function? If so then probably you current system design it to perform scheduling manually. You can use the "Production Scheduling profile" to perform this automatically. You need to assign a production scheduling profile defined for automatic Scheduling at the creation stage to you materil master "Work Scheduling" view
    Regards,
    Prasobh

  • How can we change the Reports scheduled Time in OBIEE 11.1.1.5

    Hello Friends,
    I have scheduled BI Publisher reports for FTP, but now I want to change the scheduling time or cancel the scheduled reports.
    But I didn't get any option for that. If any body know, please let me know.
    Thanks & regards,
    Pradip

    Hi Pradip,
    Go to the report location. You will find options open, Edit, schedule etc based on previliges. Click on schedule.
    then you will find options, General, Output, schedule Notification. Under Scgedule tab you can change the scheduled time of the report.
    Thanks,

  • In firefox, the video from website "tv.vu.edu.pk" is not displaying even i have installed the latest version of JAVA. There rotates a circle around java monogram every time but video is not playing even it is working fine with internet explorer

    In firefox, the video from website "tv.vu.edu.pk" is not displaying even i have installed the latest version of JAVA. There rotates a circle around java monogram every time but video is not playing even it is working fine with internet explorer

    It's not working here as well with Java 6 U25 on Linux.

  • Scheduled time has been changing with out specifing

    i have submitted a job using dbms_job.submit(v_JobNum,v_command,null,null);.
    but when the scheduled time is reached, the job is not getting execute,instead it's time has been changed to next 5 min for every time, which leads the job should not got execute.
    what will i do??
    Thanks & Regards,
    Rajesh.P

    I suspect that your job is failing.
    Query user_jobs for the failures column. If this is non-zero, then you know your job is failing, and being retried.
    I forget what the limit is, but basically the job will be retried several times, and when it reaches the limit of retry-attempts, it will mark the job as broken (see the broken column).
    If this is the case for you, you need to examine what the job is running to see why it might be failing.

  • TS4510 'Do not disturb' moon icon still stay on after my scheduled time.

    I thought the 'Do not disturb' issue should have solved until I recently slide the 'Do Not Disturb' back to 'ON' and found that the moon icon still stay on after my scheduled time. Restarted the iphone5 (already running iOS 6.1.3) still showed the moon icon.
    If the 'Do Not Disturb' is slide to OFF, with a schedule period being set (e.g. 22:00 - 07:00). The moon icon still appear from 22:00, no noise.
    If the 'Do Not Disturb' is slide to ON, moon icon always show, phone still ring outside the scheduled period.
    Is it what the 'Do Not Disturb' designed to work like this now?
    Thank you.

    'Do Not Disturb' ON
    under Notification -> 'Do Not Disturb' Scheduled ON
    at schedule time, moon icon APPEAR (~10 seconds delay), ring NOT from 'Favorites' PASS THROUGH
    'Do Not Disturb' OFF
    under Notification -> 'Do Not Disturb' Scheduled ON
    at schedule time, moon icon APPEAR (~10 seconds delay), right NOT from 'Favorites' PASS THROUGH
    'Do Not Disturb' ON
    under Notification -> 'Do Not Disturb' Scheduled OFF
    moon icon APPEAR
    Allow Calls From 'Favorites', (test phone not on favorites)
    phone STILL RINGS!
    I think the above tests should proof that the 'Do Not Disturb' is not working except showing a moon icon.

  • Precalculated web templates,Its scheduling time&Routines built on Queries??

    Hi ALL,
    <b>In the same way, I want the way to find out the list of Precalculated web templates, its scheduling time & Routines built on the Queries using RSRT T-code.
    Can anyone let me know to find out the Query properties using RSRT if we dont have access to BEX Analyser etc.,</b>
    (As we have in RSRT for seeing List of Objects in Free Characteristics, Filters, Rows, Columns and also the exceptions, variables, conditions built etc.,)
    Will be waiting for Answers on this.
    Points will be rewarded for sure.

    If it is 3.X Web Templates you can use function module RZX2_OBJECT_DELETE
    populating I_T_PARAMS table with
    first OBJID field as the technical name of your template and
    second OBJTYPE field as constant 'HT'.
    you can add as many rows as you want.
    If it is 7.X Web templates you can use function module RSOBJS_DELETE
    populating I_S_PARAMS with
    first field OBJ_TYPE as 'BTMP',
    second filed OBJ_KEY as the technical name of your template
    this function module allows only one template to be deleted at a time
    If you are comfortable with ABAP, and if you have a list of all your 100 web template technical names,
    you can just write a program with a internal table containing the names of these templates and calling the above function modules in a loop.y passing one value at a time.
    Hope it helps!

  • How can I turn off access to the internet at scheduled times?

    how can I turn off access to the internet at scheduled times? I use an Airport extreme and several units to extend the range. Kids have multiple devices that I don't want on the network at certain hours. On the other hand, ideally, my wife and I would like to be able to access the internet with our devices after the kid's bedtime and during their school study time.

    http://www.macobserver.com/tmo/article/airport_utility_setting_wireless_time_lim its

  • Stop/Restart instance(s) in scheduled time

    hi,
    we have number of sap instances running in our environment( Unix).  Wondering, if there are any feature in Solution Manager/ any other ways -  to schedule certain instance to stop and restart during system outage days.
    I am currently developing a Unix script to read a input file for instances to stop/restart in scheduled time.
    Thanks,
    Raj S

    Raj,
    I have not used this but i suppose this is possibel using SAP Solution Manager downtime management.
    Read Note 1129385 - Downtime Management with SAP Solution Manager: FAQ
    Also there are some documents for setup in SCN , you can search for configuration .
    Regards,

  • Schedule time to shut down cisco IP phones

    Dear All,
    i would like to ask if there is any way to schedule time on CUCM 7 allowing us to shut down cisco ip phones during week ends, and which cisco ip phone models that support this feature.
    regards

    Hassan,
    I'm no phone guy but if you want to POWER OFF the phones outside office hours there are serious implications to consider.
    If your phones have PCs connected to them, there's a large chance that when the phones go off, the PCs will not be able to reach the network (because VoIP phones do not have bypass functionality).
    Another thing is in an emergency, no one can make outgoing/incoming calls.
    If this is what you want then you could try EnergyWise if you don't have acess to your CUCM services.  Let's say you want to power off your phones at midnight and power up by 5am the next morning (weekdays):
    !Globalenergywise domain security shared-secret energywise importance 60!  Time Rangetime-range ONabsolute start 05:00 01 March 2013periodic weekday 5:00 to 23:59time-range OFFabsolute start 00:00 01 March 2013periodic weekday 0:0 to 5:00!  Interfaceinterface GigabitEthernet0/1energywise level 10 recurrence importance 70 time-range ONenergywise level  0 recurrence importance 70 time-range OFFenergywise importance 60

Maybe you are looking for

  • Error in using one's collection values in other collection

    hi, I want to fetch cursor s values based upon cursor r part_no column to populate childbkp table.but i m getting eror .plz help me to resolve.in code it might b many mistakes also. declare           TYPE PartNum IS TABLE OF parent.part_num%TYPE     

  • Is this an issue with Windows 8.1 Enterprise Main theme or with my Laptop Screen??!!

    Hello, I currently found a strange issue happening with my display and it only occurs when I am setting my desktop background as the Main Windows theme or any picture I set as a theme. When I click inside any open folder as shown in this recorded vid

  • Opening a New Window/Session....

    Hi, I have a hyperlink in one of my application as: Test Link When a Superuser click on one of the Subusers it opens a New window with the Current Username parameter passed.(Via the jsp page). But the problem is when the SUperuser is coming back to h

  • HT5649 how to use songs as a ringtone?

    How can i use my I tunes songs as a ringtone? kindly provide tutorials and detail process.

  • Connecting vlans to router

    If I create a sub if on my router, do I have to create 1 for each vlan or can I assign to vlans to 1 sub interface ?