? about executing servlet at a specific time

I have a need to execute a servlet once per day unattended to do a database
          function. Any idea on this (must be done from servlet without sucking up cpu
          time).
          Tom K.
          

I agree with Robert. You shouldn't be creating your own threads in the server vm.
          Instead you should rely on the time service api.
          Prasad
          Robert Patrick wrote:
          > Of course, this means that your startup class either starts its own thread or
          > monopolizes one of the servers execute threads. The WebLogic Time service is
          > probably the suggested way of accomplishing this...
          >
          > Just my two cents,
          > Robert
          >
          > Marc Mazas wrote:
          >
          > > You can write a startup servlet which iterates on computing the
          > > remaining delay and sleeping for this time with the standard wait(...)
          > > java call.
          > >
          > > Tom Kochanowicz wrote:
          > > >
          > > > I have a need to execute a servlet once per day unattended to do a database
          > > > function. Any idea on this (must be done from servlet without sucking up cpu
          > > > time).
          > > >
          > > > Tom K.
          

Similar Messages

  • What is the best way to execute code at a specific time?

    Hello,
    I have a problem. I need to execute some code at a specific time: subVI A should run at e.g. 2 seconds (after start) and stop at 3.5 seconds and subVI B should execute at 3.5 seconds until 5 s. The user can choose the time points. It could also be that subVI B has to execute before subVI A or at the same time.
    Time precission is not important +/- 20 ms is ok.
    I have implemented it like that: In a loop (period time approx. 20ms) I query if the timeframe has come and then the subVI will be executed.
    See attached picture.
    I don't believe that this is an economic way. It will produce high CPU load. How can I do it better?
    Greetings Johannes
    Using LabVIEW 7.1 and 2009 recently
    Attachments:
    Timeframe.PNG ‏9 KB

    @HaD
    Something like this?
    Johannes
    LabVIEW 7.1 (!)
    Greetings Johannes
    Using LabVIEW 7.1 and 2009 recently
    Attachments:
    Timeframe.vi ‏33 KB

  • Auto-Run the servlet class at specificed time

    Hi,
    I am new to Jsp. I remember there is a feature where I define something in web.xml to auto-run a servlet at certain time.
    something like for everyday 4:30am, I want to clear up all the log file in my server.
    Please tell me how to do it or any reference.
    Thank you.

    if you are using a windows machine you can just schedule a task every day at that specified time and just run it. As far as the web.xml file telling the servlet to run at a specified time, I haven't heard of that. I just know that you can tell the server at what precedence you want the loading of the servlet(s).
    Hope this helps. Also, search the forum for more information on this matter. I'm sure that there are more posts on this matter that could assist you further.
    Good luck

  • Servlet that executes at specific time intervals ?

    Hi
    I need to have my Servlet that is loaded onto the webserver, run at specific time intrevals, say every 10 minutes.
    How do I do that ?
    Thanx in advance
    Aragorn

    I have trouble with this concept.
    HTTP is a request/response protocol. Usually a servlet runs when it receives an HTTP request and sends back an HTTP response.
    If you want the servlet to wake up and do something at a fixed interval, it's not responding to an HTTP request anymore. What does it do with the HTTP response that's generated? What happens if it receives an HTTP request from an external client after waking up and starting the timed process? Have you made sure that your servlet is thread-safe in that case?
    This feels less like a servlet and more like something else (e.g., an RMI service, EJB, or multi-threaded server). It sounds like you're using the servlet engine/container as a convenient service container, but I don't think servlets were meant to be used that way.
    I'll be happy to take instruction on this if I'm incorrect. I just thought I'd disagree to see what the response might be. Thanks - MOD

  • How can I execute a command every 10 seconds in a specific time-frame

    Hello,
    I would like to create a script which in a specific time-frame collects some outputs and also pings every 10 seconds.
    To collect the outputs every minute from 22:00PM to 22:10PM I have the following:
    event manager applet snmp_output
    event timer cron cron-entry "0-10/1 22 * * *" maxrun 30
    action 010 cli command "enable"
    action 020 cli command "show clock"
    action 030 cli command "terminal exec prompt timestamp"
    action 040 cli command "show snmp stats oid | append bootdisk:show_snmp_stats_oid.txt "
    action 045 wait 5
    action 050 cli command "show snmp pending | append bootdisk:show_snmp_pending.txt "
    action 055 wait 5
    action 060 cli command "show snmp sessions | append bootdisk:show_snmp_sessions.txt "
    acionn 065 wait 5
    action 070 cli command "end"
    To confirm connectivity to the device doing the SNMP polls I would like to execute a ping every 10 seconds in the same timeframe.
    Cron seems only to support minutes. Is it possible to combine a watchdog timer + a cron timer?
    Can this ping function be incorporated in the SNMP output applet or will I have to write a new one?
    Will I need TCL here (I have no experience in TCL)?
    Best regards,
    Tim

    If you wanted the pings to run in parallel, you could have this applet configure another applet to do the pinging, then remove it on the last run.  This will require an amount of programmatic logic, though.  If you wanted to keep things a bit simpler, add another applet that runs at 22:00 that configures a watchdog pinging applet, then a third applet that runs at 22:10 that removes the pinging applet.
    When it comes to embedded quotes when you configure your nested pinging applet, you'll need to use $q to stand for the embedded quotes.  You'll also need to configure:
    event manager environment q "

  • Execute Java Program in a specific time everyday

    Hi All,
    I need help for Execute Java Program in a specific time everyday.
    I want to do insert data into database every 3:00 AM everyday.
    I thought there is a one thread program will do. It is correct my understanding? Please let me know and guide me How can I do?
    Thanks
    Amit

    If you are using Window$ then you can create a bat file to execute the program and place the bat file in Scheduled Tasks.

  • Proecure to be executed at specific time

    Hi All,
    I have created a procedure which will create table on top of data from another schema, but i want the procedure to be executed at midnight as there would be some udpates in database during the day until midnight. I want to create my tables on top of the database after updates have been commited. Is there anyway to achieve this task to execute my proecure by assigning a specific time?
    Best Regards,
    Lee

    hi
    We use DBMS_JOB.
    But as I read, DBMS_SCHEDULER is a newer feature of ORacle. Can I do everything with scheduler, which I did with DBMS_JOB?
    And can I reach scheduler logs? Finally are there any performance differences

  • Execute a Job  in  a specific time

    Hi Friends,
    I want to create a job that is gonna start in a specific time.
    But when the job is executed It does not receive the parameters that I'm sending with the sentence SUBMIT.
    The code is:   
    BEGIN JOB
            CALL FUNCTION 'JOB_OPEN'
              EXPORTING
                jobname                = ls_job
               sdlstrtdt              = '20080702'
               sdlstrttm              = '180830'
               jobclass               = 'A'
             IMPORTING
               jobcount               = li_number
             EXCEPTIONS
               cant_create_job        = 1
               invalid_job_data       = 2
               jobname_missing        = 3
               OTHERS                 = 4.
            IF sy-subrc <> 0.
              MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                      WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
            ENDIF.
    EXECUTE PROGRAMM Z WITH 3 PARAMETERS
            SUBMIT zmmp0421
            WITH pa_bukrs EQ e_trbkpv-bukrs
            WITH pa_belnr EQ e_trbkpv-belnr
            WITH pa_gjahr EQ e_trbkpv-gjahr
            USER ls_user VIA JOB ls_job NUMBER li_number
            AND RETURN.
    CLOSE JOB
            CALL FUNCTION 'JOB_CLOSE'
              EXPORTING
                jobcount             = li_number
                jobname              = ls_job
                sdlstrtdt            = '20080702'
                sdlstrttm            = '180830'
                dont_release         = ' '
                strtimmed            = 'X'
              EXCEPTIONS
                cant_start_immediate = 1
                invalid_startdate    = 2
                jobname_missing      = 3
                job_close_failed     = 4
                job_nosteps          = 5
                job_notex            = 6
                lock_failed          = 7
                OTHERS               = 8.
    Could you plzzz tell me ... what's wrong???

    Hello there!
    Just look to some comments to your code:
    1 - When you OPEN the job, don't give a start time and not needed paramters, that can avoid it to work properly.
    CALL FUNCTION 'JOB_OPEN'
         EXPORTING
              jobname          = w_jobname
         IMPORTING
              jobcount         = w_jobcount
         EXCEPTIONS
              cant_create_job  = 1
              invalid_job_data = 2
              jobname_missing  = 3
              OTHERS           = 4.
    2 - If you want your JOB to start in a specific time, why do you use parameter strtimmed EQ 'X' at CLOSE job? It's not coerent.
    CALL FUNCTION 'JOB_CLOSE'
         EXPORTING
              jobcount             = w_jobcount
              jobname              = w_jobname
              sdlstrtdt            = sy-datum
              sdlstrttm            = l_hora
              targetserver         = w_servidor
         IMPORTING
              job_was_released     = l_liberado
         EXCEPTIONS
              cant_start_immediate = 1
              invalid_startdate    = 2
              jobname_missing      = 3
              job_close_failed     = 4
              job_nosteps          = 5
              job_notex            = 6
              lock_failed          = 7
              OTHERS               = 8.
    3 - To pass parameters to your submited report, use a table to pass those to it:
    DATA: seltab     TYPE TABLE OF rsparams,
          seltab_wa  LIKE LINE OF seltab.
    CLEAR seltab_wa.
    seltab_wa-selname = 'PA_BUKRS'.
    seltab_wa-low = e_trbkpv-bukrs.
    APPEND seltab_wa TO seltab.
    seltab_wa-selname = 'PA_BELNR'.
    seltab_wa-low = e_trbkpv-belnr.
    APPEND seltab_wa TO seltab.
    seltab_wa-selname = 'PA_GJAHR'.
    seltab_wa-low = e_trbkpv-gjahr.
    APPEND seltab_wa TO seltab.
    SUBMIT zmmp0421
        WITH  SELECTION-TABLE seltab
        USER sy-uname
    VIA JOB w_jobname NUMBER w_jobcount
         AND RETURN.
    Hope this helps you some way.
    Regards.
    Valter Oliveira.

  • SharePoint Designer workflow executing same lines\steps multiple time in single instance

    I am working SharePoint 2010 workflow. I am facing an issue.
    Problem:
    1) I have few workflows running on different situation
    2) Out of all workflows one is set to execute on "Item Created"
    3) This workflow having some lines to execute and then create an item and then wait for a change in field value.
    4) Expectation: This should create one instance and execute the lines\steps only once and wait for field change.
    5) Actual Out-Come: The workflow is executing the lines\steps three times in a single instance.
    6) The workflow history is showing the three time execution of all lines\steps using log to history.
    7) It is a SPD workflow so there is no while loop. but it behaving like while loop.
    8) On create Item, we are creating task, so it is creating three tasks. It is sending three emails and also we are appending text in title so text is appended three times.
    I did a lot of research but not able to find the solution.
    Please help.
    - Khan Abubakar Disclaimer: The opinions expressed herein are my own personal opinions and do not represent any others view in anyway.

    Hi Khan,
    According to your description, my understanding is that your workflow executed some actions three times.
    What actions did you for the problematic actions?
    If they are "Start Approval Process" action, please check whether there are multiple approvers for tasks. If yes, the action will create one task for each approver.
    Please create a new list and a new workflow based on the problematic workflow, test again, compare the result.
    For reproducing your issue, I suggest you provide more information about your list and workflow (detailed actions or some screenshots). It will make others in the forum easy to find a solution for you.
    Best Regards,
    Wendy
    Wendy Li
    TechNet Community Support

  • How do I schedule a task at a specific time of day, every day?

    I am trying to use Timer and TimerTask to schedule an event at specific time of the day. It will basically stop all the logging archive the log file and start a new logfile.
    I am just having trouble with scheduling it for every day at specific time (I am new to java and have not worked with date and time much). If someone can point me to some sample code or show me a brief example I would really appreciate it. I am about to pull my hair.
    Thanks in advance!!!

    hi
    I assume you use the swing class. As you suggest, to schedule an event you have to use a timer. The delay of the timer can easy be calculated using GregorianCalendar objects. Create one for the current date/time by instantiating an object. Create a second and set the date to the next schedule date/time. Retrieve the milliseconds from both objects and calculate the differences.
    best regards
    benny

  • How to mask out specific area in a specific time?

    Hi,
    I want to make a mask on a specific area of the footage in a specific time. I drew the mask and all the frame went black,so I clicked on Mask-> invert and only the specific area I masked went black,which is exactly what I wanted.
    Now I want to make it happen in a specific time, not on all timeline, but I can't find a way to do it. I thought about lowering down the mask opacity to 0% and a frame later bringing it to 100%, but if I lower down the opacity of the mask, it lowers down the opacity of the whole frame, same as
    lowering down the opacity of the frame by intention, which seems weird, cause I did inverted the mask, and as I understand it, it should affect the opacity of the mask and not the whole frame...
    any ideas...?
    I'm using CS4.

    Put a copy of the footage on the timelime below the one you masked. Use opacity like you doing and it will reveal the track below.

  • SAP_COLLECTOR_FOR_PERFMONITOR - canceled only at specific time

    Hi All,
    Job SAP_COLLECTOR_FOR_PERFMONITOR is scheduled hourly on ECC system.
    All jobs are finished successfully in a day but only at specific time its getting failed.
    Recently we have upgrade the support package of SAP_BASIS & SAP_ABP from 05 to 13. After then we are getting this error message.
    In ST22 we getting ABAP dump for job:-
    Runtime Errors         LOAD_PROGRAM_NOT_FOUND
    Date and Time          27.08.2014 12:19:42
    Short text
         Program "RSORA811" not found.
    What happened?
         There are several possibilities:
         Error in the ABAP Application Program
         The current ABAP program "RSCOLL00" had to be terminated because it has
         come across a statement that unfortunately cannot be executed.
         or
         Error in the SAP kernel.
         The current ABAP "RSCOLL00" program had to be terminated because the
         ABAP processor detected an internal system error.
    Error analysis
        On account of a branch in the program
        (CALL FUNCTION/DIALOG, external PERFORM, SUBMIT)
        or a transaction call, another ABAP/4 program
        is to be loaded, namely "RSORA811".
        However, program "RSORA811" does not exist in the library.
        Possible reasons:
        a) Wrong program name specified in an external PERFORM or
           SUBMIT or, when defining a new transaction, a new
           dialog module or a new function module.
        b) Transport error
    How to correct the error
        Check the last transports to the R/3 System.
        Are changes currently being made to the program "RSCOLL00"?
        Has the correct program been entered in table TSTC for Transaction " "?
        If the error occures in a non-modified SAP program, you may be able to
        find an interim solution in an SAP Note.
        If you have access to SAP Notes, carry out a search with the following
        keywords:
        "LOAD_PROGRAM_NOT_FOUND" " "
        "RSCOLL00" or "RSCOLL00"
        "LOOP_AT_SYSTEMS_AND_REPORTS"
    System Details :-
    SAP Version - SAP ECC 6.0 EHP 4
    Oracle DB - 10.2.0.5.0
    OS- HP UNIX 11.31
    Kernel Release 721 - patch level 201
    Please suggest for solution
    Regards,
    Ajay Asawa

    Hi Ajay,
    If any job is failing at a particular time, you should look for other changes happening in you system.
    Perhaps, any other job running causing problems.
    Alos, refer: 1841778 - LOAD_PROGRAM_NOT_FOUND in RSCOLL00
    Regards,
    Divyanshu

  • How to create a date object with a specific time?

    How can I create a date with today's date but with a specific time, say: 20:00:00?
    Thanks in advance.

    Don't forget about those pesky milliseconds!I'd have gotten away with it too.. if it hadn't been
    for that pesky BigDaddyLoveHandles.I'm in top form today. On the drive in to work I managed to
    push two scooter riders off the road and gave the finger to
    a Prius owner.

  • IOS7:  "all-day, repeating" entry from all-day to a specific time.

    Since upgrading to ios7 (iPhone 5, Verizon) when using the calendar I can't switch an "all-day, repeating" entry from all-day to a specific time. There's no "all-day" toggle switch.  Does anyone know how to correct this?  My friend has the 5s &amp; AT&amp;T and she doesn't have this problem.  Hers shows a toggle switch!

    I haven't completely discounted it but it seems like I would need to back up to files, then restore from files. I don't want to do that. I want a full file system level SAN snapshot that I can just drop into place. The does work when the production base is shut down. However, considering that I do have archive logs, shouldn't it be possible to use them to recover to a specific scene without having to do an RMAN backup at all? It seems that doing an RMAN backup/recovery would just make this whole process a lot longer since the DB is 160 gigs in size (not huge, but the dump would take more time than I would like). With a SAN snapshot, if I can get this to work, I'm looking at about a 15-20 minute period of time to move the production DB over to test.
    Since you are suggesting that RMAN may be a better approach I'll provide more details about what I'm trying to do. Essentially this is like trying to recover a DB from a server that had its power plug pulled. I was hoping that Oracle's automatic recovery would do the same thing it would do in that instance. But obviously that doesn't work. What I want to do is bring over all the datafiles, redo logs, and archive logs using the SAN snapshot. Then if possible use some aspect of Oracle (RMAN if it can do it) to mount the database, then recover to a specific time or SCN if using RMAN. However, when I tried using RMAN to do it, I got an error saying that it couldn't restore the data file because it already existed. Since I don't want to start from scratch and have RMAN rebuild files that I've already taken snapshots of (needless copying of data), I gave up on the RMAN approach. But, if you know of a way to use RMAN so that it can recover to a specific incarnation without needing to runm a backup first, I am completely open to trying it.

  • Table or FM to display inventory for material in plant for a specific time

    Hi, is there a table or FM or transaction that can display the plant inventory for a material for certain batch/plant for a specific time? I need to trouble shoot a problem that may be related to delivery not been created on the date determined in the sales order schedule line. Need to see if there is actually sufficient stuff at the time when the delivery due list is executed.
    MMBE or MB52 only gives me the inventory level as of the systems date/time. Need to pull out historical data.
    Any advise is appreciated.
    Thanks

    hi
    MB5B is one option to get stock on particular date.may be you can chedck MD05 - MRP list to get stock statement at time of MRP run.
    Vishal...

Maybe you are looking for

  • Free goods in STO & Inter company PO

    Hi Friends I have one scenario where I get article as free with other Articles, the same free article may get from with out free from some other vendor also. but this free article should be distributed to store with STO and Inter company PO. problem

  • How do I get the artwork of the now playing track to show full screen?

    I've got iTunes 11 on Windows 7. I'd like to leave the PC running and just see the artwork of the current track - preferably full screen. Something similar to visualizer ... but with only the artwork instead of the psychedelic streamers. This is basi

  • How do I free up 'Other' Space on my iPod Touch?

    So I just bought an 8GB iPod Touch 4 today, and while syncing my music and downloading apps, I noticed there was a chunk of space called "Other" on my iPod (Shows in iTunes) That takes up a large 0.9 GB. Since my iPod is an 8GB and I want to keep the

  • Cannot upgrade to Windows XP Pro from XP Home

    Hi there, I am having trouble upgrading to XP Pro. I have a Satellite A40-702, using a full version of XP pro it gets to exactly 70% of copying files before installation then I get a message saying cannot copy dxdiagn.dll. I can skip the file but the

  • Edit in photoshop (Elements 11) grayed out in LR 4.2

    I have just installed Photoshop Elements 11 and LR 4.2. For the first time in my experience the edit in photoshop is grayed out. All my NIK software is recognized, only photoshop is grayed out. I have the external editor set for TIFF, 16-bit. Any sol