Run function every hour

Can anyone help? I need to be able to run a function every hour.
One way is:
javax.swing.Timer rateTimer=new javax.swing.Timer(3600000,new ActionListener(){
          public void actionPerformed(ActionEvent evt){
// your code here
it there any other way or is this the best?

Should mention that if the timed service is the only thing the application is going to do (rather than many things) then you might want to look to your OS to see what scheduling services it already has. Then the OS could run your application once an hour.

Similar Messages

  • HT3275 Time Machine on Macbook Pro and iMac both running 10.7.4 don't react the same. Macbook Pro runs back every hour even if asleep, and iMac only when it's awake. Why?

    Time Machine on Macbook Pro and iMac both running 10.7.4 don't  react the same. Macbook Pro runs back every hour even if asleep, and iMac only when it's awake. Why?

    I thought the backup whilst asleep was only used on Mountain Lion.. but perhaps it was also introduced with Lion.. anyway it is only enabled on later firmware.. in latest laptops.
    http://reviews.cnet.com/8301-13727_7-57480490-263/mountain-lions-powernap-featur e-requires-firmware-update/
    A quick google finds all sorts of info.. remember google is your friend.

  • Schedule my report to run after every hour

    Hi All,
    Can someone please tell me how can I schedule my report to run after every 1 hour so that the dashbaord performance increases.I have started the scheduler service .
    Thanks a lot for your help

    Hi,
    create an ibot for the report.
    first configure the BI delivers, you can find the steps here,
    http://oraclebizint.wordpress.com/2007/09/13/oracle-bi-ee-10133-configuring-delivers-ibots/
    sorry. as you have already started the scheduler service you don need to go thru the above link.
    thanks,
    karthick
    Edited by: kart on May 24, 2010 12:44 PM

  • Automatically run an app every hour?

    I need to automatically run an app every hour.
    I have a Time Capsule that I am getting rid of because the new UVerse fiber optic internet box does the same router functions but not the back up functions. So I want to make my external drive work like a Time Capsule. That is to mount when needed and unmount when not needed. To that end I have written an application using Applescript/Automator that does exactly that. Mounts the drive, runs the backup and unmounts the drive afterward. Now I am having a hard time finding a way to schedule it to run every hour. Most scheduler apps will only run once a day and Cronnix no longer seems to work or I can't make it work.
    Any thoughts?

    You really should use launchd. Lingon is a good tool, give it another look.
    I created the following plist with Lingon.
    Copy it in TextEdit, save as a plain text file (⇧⌘T) and copy it to Library/LaunchAgents (Lingon does all this for you):
    You need to change the path and name of myApp:
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    font-weight: normal;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px;
    color: #000000;
    background-color: #E6E6EE;
    overflow: auto;"
    title="this text can be pasted into a text editor">
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    <key>Label</key>
    <string>com.Damien.myTimeMachine</string>
    <key>ProgramArguments</key>
    <array>
    <string>/Applications/myApp.app</string>
    </array>
    <key>StartInterval</key>
    <integer>3600</integer>
    </dict>
    </plist>
    </pre>

  • OSX now crashes every hour. OSX apps like Dock, desktops, launchpad, finder, toolbar, etc become unresponsive, although sometimes non OSX apps (like Chrome, TextMate, etc) remain functioning briefly. No obvious reason or trigger

    OSX now crashes every hour. For no obvious reason or trigger, suddenly OSX apps like Dock, desktops, launchpad, finder, toolbar, etc become unresponsive, although sometimes non OSX apps (like Chrome, TextMate, etc) remain functioning briefly, before the whole thing hangs and needs a hard reboot.
    It is not apparent what I do to provoke the crash -- it happens while I am in seemingly any application, sometimes just reading a page and not taking any actions.
    This started happening very suddenly two days ago. It might have happened around the time I updated ITunes but I'm not sure of this at all. And I never use ITunes or have it open.
    Don't know how to diagnose the problem since nothing is accessible whence it freezes up on me.  I tried software update, but problem continued after. Would appreciate troubleshooting advice. Thanks!
    best,
    gene

    If you have more than one user account, these instructions must be carried out as an administrator.
    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the icon grid.
    Step 1
    Make sure the title of the Console window is All Messages. If it isn't, select All Messages from the SYSTEM LOG QUERIES menu on the left. If you don't see that menu, select
    View ▹ Show Log List
    from the menu bar.
    Enter "BOOT_TIME" (without the quotes) in the search box. Note the timestamps of those log messages, which refer to the times when the system was booted. Now clear the search box and scroll back in the log to the last boot time after  you had the problem. Select the messages logged before the boot, while the system was unresponsive or was failing to shut down. Copy them to the Clipboard (command-C). Paste into a reply to this message (command-V). Please include the BOOT_TIME message at the end of the log extract.
    If there are runs of repeated messages, post only one example of each. Don’t post many repetitions of the same message.
    When posting a log extract, be selective. In most cases, a few dozen lines are more than enough.
    Please do not indiscriminately dump thousands of lines from the log into this discussion.
    Important: Some private information, such as your name, may appear in the log. Anonymize before posting.
    Step 2
    Still in Console, look under System Diagnostic Reports for crash or panic logs, and post the entire contents of the most recent one, if any. In the interest of privacy, I suggest you edit out the “Anonymous UUID,” a long string of letters, numbers, and dashes in the header of the report, if present (it may not be.) Please don’t post shutdownStall, spin, or hang logs — they're very long and not helpful.

  • How to schedule a Stored procedure to run every hour in SQL server express

    Hi,
    I am using SQL server express and I want to schedule a Stored procedure to run every hour.
    The Stored Procedure name is UpdateData.
    Can someone please give an example of how i can schedule this to run every hour, given that I do not have SQL Server agent on my express edition.

    Hello,
    You will find more options on the following thread.
    http://stackoverflow.com/questions/1675206/how-to-run-a-stored-procedure-every-day-in-sql-server-express-edition
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • Why is the purge command running every hour, and freezing my system?

    I noticed over the past several days that my mac pro will freeze for several seconds (clock stops, mouse/keyboard don't work. completely frozen) every hour, to the minute.
    I've tracked it down to the "purge" command, which is causing the problem.  But, I can't find where it's being called.  Any hints where I might look to find the cause?
    I don't believe this was happening a few days ago. I have installed all software updates.
    I'm running 10.7.5 on a 2x2.66Ghz 6-core mac pro.
    Thanks!

    Please read this whole message before doing anything.
    This procedure is a diagnostic test. It won’t solve your problem. Don’t be disappointed when you find that nothing has changed after you complete it.
    Third-party system modifications are a common cause of usability problems. By a “system modification,” I mean software that affects the operation of other software — potentially for the worse. The following procedure will help identify which such modifications you've installed. Don’t be alarmed by the complexity of these instructions — they’re easy to carry out and won’t change anything on your Mac. 
    These steps are to be taken while booted in “normal” mode, not in safe mode. If you’re now running in safe mode, reboot as usual before continuing. 
    Below are instructions to enter some UNIX shell commands. The commands are harmless, but they must be entered exactly as given in order to work. If you have doubts about the safety of the procedure suggested here, search this site for other discussions in which it’s been followed without any report of ill effects. 
    Some of the commands will line-wrap or scroll in your browser, but each one is really just a single line, all of which must be selected. You can accomplish this easily by triple-clicking anywhere in the line. The whole line will highlight, and you can then copy it. The headings “Step 1” and so on are not part of the commands. 
    Note: If you have more than one user account, Step 2 must be taken as an administrator. Ordinarily that would be the user created automatically when you booted the system for the first time. The other steps should be taken as the user who has the problem, if different. Most personal Macs have only one user, and in that case this paragraph doesn’t apply. 
    Launch the Terminal application in any of the following ways: 
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.) 
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens. 
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid. 
    When you launch Terminal, a text window will open with a line already in it, ending either in a dollar sign (“$”) or a percent sign (“%”). If you get the percent sign, enter “sh” and press return. You should then get a new line ending in a dollar sign. 
    Step 1 
    Triple-click the line of text below to select it:
    kextstat -kl | awk '!/com\.apple/{printf "%s %s\n", $6, $7}' 
    Copy the selected text to the Clipboard by pressing the key combination command-C. Then click anywhere in the Terminal window and paste (command-V). Post the lines of output (if any) that appear below what you just entered. You can do that by copying and pasting as well. Omit the final line ending in “$”. No typing is involved in this step.
    Step 2 
    Repeat with this line:
    sudo launchctl list | sed 1d | awk '!/0x|com\.(apple|openssh|vix)|edu\.mit|org\.(amavis|apache|cups|isc|ntp|postfix|x)/{print $3}' 
    This time you'll be prompted for your login password, which you do have to type. It won't be displayed when you type it. Type it carefully and then press return. You may get a one-time warning to be careful. Heed that warning, but don't post it. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator. 
    Note: If you don’t have a login password, you’ll need to set one before taking this step. If that’s not possible, skip to the next step. 
    Step 3
    launchctl list | sed 1d | awk '!/0x|com\.apple|edu\.mit|org\.(x|openbsd)/{print $3}' 
    Step 4
    ls -1A /e*/mach* {,/}L*/{Ad,Compon,Ex,Fram,In,Keyb,La,Mail/Bu,P*P,Priv,Qu,Scripti,Servi,Spo,Sta}* L*/Fonts 2> /dev/null  
    Important: If you formerly synchronized with a MobileMe account, your me.com email address may appear in the output of the above command. If so, anonymize it before posting. 
    Step 5
    osascript -e 'tell application "System Events" to get name of every login item' 2> /dev/null 
    Remember, steps 1-5 are all copy-and-paste — no typing, except your password. Also remember to post the output. 
    You can then quit Terminal.

  • How can I get Automator to run every hour

    Hello,
    I want to run a Unix Shell executable every hour (measuring network bandwidth), but automator only seems to be able to go down to once  a day. Is there anyway of getting automator to run the executable every hour?

    If you already have the shell script then skip Automator and use launchd(8)  to run the script on what ever schedule you'd like.
    There are many good tutorials and examples of using launchd  see Creating Launch Daemons and Agents - Apple Developer and Mac OS X launchd examples  for a start.
    Also see http://launched.zerowidth.com/ as one way to automate making the plist file.
    regards

  • I want to schedule a dbms_job to run for every one hour

    Hi Guys,
    I want to schedule a dbms_job(in oracle 10g) to run for every one hour. Can any one provide some idea on this.
    KLR

    Thanks for your reply, but I am getting the error below
    'ORA-06550: line 1, column 112:
    PLS-00103: Encountered the symbol "END" when expecting one of the following:
    := . ( @ % ;
    The symbol ";" was substituted for "END" to continue.
    ORA-06512: at "SYS.DBMS_JOB", line 82
    ORA-06512: at "SYS.DBMS_JOB", line 139
    ORA-06512: at line 7'
    can you please check this error and let me know how can I execute one package for every one hour and how to see whether the job is running every one hour or not.
    Thanks in advance.
    KLR.

  • Running automator on the hour every hour

    I am trying to set up an image action to run every hour on the hour with out having to make an iCal entry for every hour. Also I unfortunately can't make the folder a hot folder beacuse it is a windows server.
    Is it possible the some one out their could help me with an apple script? The imaging script for automator is already made. I just would like a script to tell automator to run every hour.
    Thanks

    Try using this application to set up a cron task for that action; to do this, set the min field to 0 and put a * in the other fields which determine when the task runs.
    (18050)

  • IPhone5 with ios 6.1.2 uses cellular data when connected to wifi.  Every hour to the minute even when no apps are running, iCloud is off, Ads are off, Diagnostics are off.  Running on AT&T cellular network.

    I have 3 iPhone5's with ios 6.1.2 that user cellular data when connected to wifi.  Every hour to the minute even when no apps are running, iCloud is off, Ads are off, Diagnostics are off.  Running on AT&T cellular network. 
    Date Time To/From
    Type
    Direction
    Msg/KB
    03/14
    01:30 PM
    phone
    Internet/MEdia Net
    Sent
    78 KB
    03/14
    01:02 PM
    phone
    Internet/MEdia Net
    Sent
    4397 KB
    03/14
    12:48 PM
    phone
    Internet/MEdia Net
    Sent
    19520 KB
    03/14
    12:30 PM
    phone
    Internet/MEdia Net
    Sent
    19503 KB
    03/14
    11:30 AM
    phone
    Internet/MEdia Net
    Sent
    2427 KB
    03/14
    10:30 AM
    phone
    Internet/MEdia Net
    Sent
    359 KB
    03/14
    09:30 AM
    phone
    Internet/MEdia Net
    Sent
    1396 KB
    03/14
    09:25 AM
    phone
    Internet/MEdia Net
    Sent
    1 KB
    03/14
    08:25 AM
    phone
    Internet/MEdia Net
    Sent
    30 KB
    03/14
    07:25 AM
    phone
    Internet/MEdia Net
    Sent
    16 KB
    03/14
    06:25 AM
    phone
    Internet/MEdia Net
    Sent
    45 KB
    03/14
    05:25 AM
    phone
    Internet/MEdia Net
    Sent
    15 KB
    03/14
    04:25 AM
    phone
    Internet/MEdia Net
    Sent
    14 KB
    03/14
    03:25 AM
    phone
    Internet/MEdia Net
    Sent
    21 KB
    03/14
    02:25 AM
    phone
    Internet/MEdia Net
    Sent
    23 KB
    03/14
    01:25 AM
    phone
    Internet/MEdia Net
    Sent
    16 KB
    03/14
    12:25 AM
    phone
    Internet/MEdia Net
    Sent
    23 KB

    Hello All Who Read This!
    I just bought an iPhone 5 on the 21st of March. I ate through 850 MB's in 12 days. I read up on the issue of data consumption looking for tips to conserve data. I did not know there was a problem.
    This morning I found out that I was leaking data very little, but daily it accumulates. I am in Barcelona, Spain. I do not have a contract, I am on a prepaid Yoigo carrier.
    I happened upon an article/blog by Robert Parks at snnyc.com "problems persist in ios 6.1.2.".
    Although his situation did not relate to me, I tried a few tests on my own to see if I could stop the data leak without turning off my celular data and possibly push notifications, I think I found a solution that might help someone:
    In ios 6.1.3 goto Settings/Mail, Contacts,Calenders and scroll down to Calendars and turn off " New Invitation Alerts" and also turn off "Shared Calendar Alerts".
    My Cellular Network Data seems to be behaving. I only see a change in MB used when I open an ap that uses data.
    All The Best

  • Function module that runs for every info package

    Hi,
    Please can you give me name of function module that runs for every info package irrespective of data source.
    Cheers,
    Reddy.

    use below function module
    RSSM_SDL_START_INFOPACKAGE

  • Schedule run after every 2 hours

    hi all,
    i want to create a schedule which will run after every 2 hours.. mean.......ist run 12 AM then 2AM then 4Am.............10PM.
    how its possible.....

    Yes it is possible,
    1. Go to scenario, right click on scheduling and click on 'create schduling'
    2. give the neceessary information for agent and context
    3. select execution type as daily and enter 12.00 am
    4. click on Execution cycle, select 'Many times' , enter, maximum cycle duration = 24 hours
    interval between repitition 2 hours
    And save
    Hope u have created the schduler agent
    Regards
    Reshma

  • Lookupd runs every hour 50% cpu

    Hi i'm having a strange behave of lookupd, i can see in the serveradmin Graphs that every hour the cpu goes up to 50% for a while and then back to normal.
    I saw in top that the lookupd is working but have no idea why?
    any hints?
    thx a lot

    There was a network traffic check which i set on the webmin causing this cpu usage....

  • Generate every hour event 2331 for each DP after Software update Deployment Package deletion

    We have an organization build on SCCM 2012 R2 with 270 DPs configured with DP Pulls function. The centralized point contains DP sources available for all DP Pull.
    We have some problems with Windows Update deployment package, and we decide to delete them. We first remove them from all DPs. After more than a month we delete the deployment package. From this day, we see that the SMS_Distribution_Manager service generate
    every hour logs for contacting each of the 270 DPs to ask them for deleting the package.
    Remark: At the time we run the delete, some of the DPs were not connected. After 3 weeks all of them were connected. A month later, the SMS_Distribution_Manager
    generate always these events every hour.
    Each DP responds with a 2331 event that seems OK. Every hour the system begin with two events (2301 and then 2300 for this package, after a 2331 for each
    DP). All these events are also present in the application log of the Event Viewer. After the last DP connection that respond with 2331 event, there are no event that generalize a task for the package to definitively remove it from the database.
    Could anyone help me to correct the system?

    There are no error messages. There are only messages generated in Distribution_manager logs and Event Viewer, showing us server processing and network activity on package that was deleted over 40 days, and that happened every hours. The Microsoft support
    give us directives to delete orphan records in 4 tables
    pkgServers_L,pkgServers_G,PkgStatus_L,PkgStatus_G)
    At this time the correction has positive effect.
    A sample of event generated
    Log Name:      Application
    Source:        SMS Server
    Date:          26.02.2014 09:56:19
    Event ID:      2331
    Task Category: SMS_DISTRIBUTION_MANAGER
    Level:         Information
    Keywords:      Classic
    User:          N/A
    Computer:      wwww.xxxx.yyyy.zzz
    Description:
    On 26.02.2014 09:56:19, component SMS_DISTRIBUTION_MANAGER on computer wwww.xxxx.yyyy.zzz reported:  Distribution Manager successfully removed package "PS100066" from distribution point "["Display=\\aaa.bbb.ccc.dddd\"]MSWNET:["SMS_SITE=xxx"]\\aaa.bbb.ccc.dddd\".
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="SMS Server" />
        <EventID Qualifiers="16384">2331</EventID>
        <Level>4</Level>
        <Task>12</Task>
        <Keywords>0x80000000000000</Keywords>
        <TimeCreated SystemTime="2014-02-26T08:56:19.000000000Z" />
        <EventRecordID>825362</EventRecordID>
        <Channel>Application</Channel>
        <Computer>wwww.xxxx.yyyy.zzz</Computer>
        <Security />
      </System>
      <EventData>
        <Data>PS100066</Data>
        <Data>["Display=\\aaa.bbb.ccc.dddd\"]MSWNET:["SMS_SITE=PS1"]\\aaa.bbb.ccc.dddd\</Data>
        <Data>
        </Data>
        <Data>
        </Data>
        <Data>
        </Data>
        <Data>
        </Data>
        <Data>
        </Data>
        <Data>
        </Data>
        <Data>
        </Data>
        <Data>
        </Data>
        <Data>On 26.02.2014 09:56:19, component SMS_DISTRIBUTION_MANAGER on computer wwww.xxxx.yyyy.zzz reported:  </Data>
        <Data>
        </Data>
      </EventData>
    </Event>
    Regards

Maybe you are looking for

  • Need info on how to get the little pictures like Adobe website has next to the title of the page??

    I know how to enter title text but i need to know how to get an image next to the title of the page please help??

  • Label a graph

    I created a truss which is what a simple bridge looks like for non-engineering majors. Well on this truss, at its vertices, I want to add text such as the letters A,B,C etc. What is the way that I could add text to my graph in LabView? Attachments: T

  • Number of items/records display

    I want to set the number of items/records display base on query. I tried Set_Block_Property and Set_Item_Property, they don't have any option for me to set it dynamically. Any ideas? Thanks

  • Embed an Exported Muse Page Using "Insert HTML"?

    Hello All, I'd like to export a Muse page to HTML, then embed that entire page into another Muse page using Insert HTML. I've done some experimenting and haven't yet gotten it to work. I'm familiar with embedding html in Muse, including the linking o

  • Dimbuild causes network error 10054 "cannot send data"

    Can anyone help with this? I have an <BR>ASO app that I run dimbuilds on every month. Every month I get the same error message when the dimbuild runs:<BR><BR>Error 1042012 - Network Error [10054]: Cannot send Data.<BR><BR>If I make an exact copy of t