Execute method everyday at a certain hour

Hi!
I'm new to java. I'm implementing a java class that is being executed all the day, but at a certain hour (13:00, for example), a process into that class has to be launch.
What i've written is something like this:
private static final Date programmedDate = new Date();
this.toStart(programmedDate);
I don't know how to do it. Some help, please???

mantis wrote:
Hi!
I'm new to java. I'm implementing a java class that is being executed all the day, but at a certain hour (13:00, for example), a process into that class has to be launch.
What i've written is something like this:
private static final Date programmedDate = new Date();
this.toStart(programmedDate);Wow. That's not much.
I don't know how to do it. Some help, please???It'll be over your head, but check out Quartz .
Sounds like you'd better get familiar with the java.lang.Runnable interface, too. Read the javadocs for it.
Good luck.
%

Similar Messages

  • How do I create an automator task to run TimeMachine at only certain hours?

    Hi
    In another forum it was suggested I make an Automator task for setting TimeMachine to only run at certain hours of the day.
    I've not used Automator in the past.
    I'd like to set it to run TimeMachine from only 1AM to 7 AM.
    Can anyone point me to a good source to figure out how to do this?  Or just share with me how to write the task?
    Thanks

    You might look at this program.
    TimeMachineEditor - Time Software - Free

  • How can I disable web/data access during certain hours?

    I have added a feature to my wireless account restricting my daughter's text/data/surfing access during evening hours.  I thought I was pretty clever and assumed she would only have access to her music on her iPhone.  Turns out she can still access all she wants using our home WIFI so my sceme is rendered useless.  Other than confiscating her phone each evening, does anyone know how I can restrict wifi on her phone during certain hours?
    Also, does anyone have a nano?  Thinking she could use that for music and to set her alarm, but I don't think the nano has an alarm function.
    Thanks for your input!

    No way to restrict it during certain hours. You can restrict it always, or never. Parental supervision is one solution. It's a losing battle to try to outwit children. It's better to require trust, with consequences if trust is breached.

  • Using value selected in selectOneChoice as variable for execute method

    I have already created data controls for the session bean method so I can drag and drop on to the jsp. This works fine when entering the data into the input text fields but I really need the first value to come from an initial page and the second value to come from the dropdown. I just don't know how to get the value or how to connect it to the button for execution.
    The method takes two values
    value 1, org is passed in (how do I pass from another page? I will actually have the render for this input field set to false so it does not display)
    value 2, typeId from a selectonechoice drop-down list (how do I manipulate the soc to pass the information? Currently it looks as if it is just passing the elementAt number, I need get the actual value for the item selected. Where can I retrieve it?)
    I have a button ready to execute the method on the session bean which should take these values. (of course the inputvalue for the soc was not typeId but I changed it. The values for the soc are actually coming from another method performed earlier.)
    This is what I have so far:
    I have my input text field waiting on info to be populated from the previous page (currently I manually entered it)
    I have my selectonechoice populated
    A button with the execute method already set (b/c I initially used the drag-drop functionality to test my method)
    Forgive me for repeating myself so much.
    Thanks!

    Passing a value between pages:
    http://download.oracle.com/docs/cd/E15523_01/web.1111/b31973/af_lifecycle.htm#BABIHDAA
    Getting a value from a list item:
    http://www.oracle.com/technology/products/jdev/tips/mills/listvalue/listbindingvalue.html
    http://blogs.oracle.com/shay/2009/11/getting_the_value_from_a_selec.html

  • Execute() Method is undefined

    Hi all.
      I am developing a WebDynpro Application which will use a EJB for business logic. I am using a javabean as interface between EJB ane WebDynpro. I created a instance of model in webdynpro and i am trying to retrive the data from backend. But in webdynpro, while writing the execute() method, it displaying that execute() method is undefined for this type.
        Kindly give some suggessions to rectify this.

    Hello Pavan,
    Is your EJB Bean which is having execute method is in classpath ? Is those Home interface and all are in Proper place?
    Thx & Rgds
    SS

  • How can I find the source of report in the executable method= "Spawned" ?

    Dear all:
    how can I find the source of report in the executable method=>"Spawned" ?
    Regards,

    Hi,
    Please see this thread.
    To View Spawned Concurrent Program Source Code
    To View Spawned Concurrent Program Source Code
    Regards,
    Hussein

  • What are the operations we can do on incoming message in execute() method of pipeline component?

    Hi,
    Actually I am new to BizTalk and not getting idea about how to process message in execute method?
    Thanks in advance

    Hi Rocky,
    You can have any kind of processing done (logic applied) on the incoming message and produce output message and only restriction is implementation of the interfaces.
    As you are new to BizTalk, I suggest to go through following articles for better understanding and insight:
    http://blogs.msdn.com/b/brajens/archive/2006/11/25/how-to-develop-biztalk-custom-pipeline-components-part1.aspx
    http://blogs.msdn.com/b/brajens/archive/2006/12/03/how-to-develop-biztalk-custom-pipeline-components-part2.aspx
    http://tech-findings.blogspot.in/2013/10/custom-zipreceivepipeline-to-unzip.html
    Maheshkumar S Tiwari|User Page|Blog|BizTalk
    Server : How Map Works on Port Level

  • IDocumentQuery.Execute() method throws user does not have edit permissions exception

    I'm trying to query a document folder for all of its containing documents. Its a basic query like this:
    IPortletContext PortletContext = PortletContextFactory.CreatePortletContext(Request,Response);IRemoteSession PTSession;PTSession = PortletContext.GetRemotePortalSession();IDocumentManager documentManager = PTSession.GetDocumentManager();
    IDocumentQuery documentQuery = documentManager.CreateQuery(FolderID); documentQuery.SetSortProperty(ObjectProperty.Name);IObjectQuery queryResults = documentQuery.Execute();
    When I'm logged into the portal as an administrator, everything works fine. However if I'm logged in as a "regular" user, I get this exception when calling the Execute() method:
    Plumtree.Remote.PRC.PortalException: Exception of type Plumtree.Remote.PRC.PortalException was thrown. ---> System.Web.Services.Protocols.SoapException: Server was unable to process request. --> Access denied: Current user does not have edit permission
    I'm sending the Login Token to the portlet. Now I've tried giving the user Edit rights on the document folder as well as Edit the Knowledge Directory rights in the Activity Manager, but neither gets rid of the exception. I'm not sure what other "Edit" permissions to check. I don't even see why the user would need "Edit" permission to anything in the first place since the Execute() method simply returns an IObjectQuery that doesn't have any ability to make changes to any objects. I know that I could use the SearchFactory interface, but I wanted the results to be real time. Any help would be much appreciated. Thanks!
    Jimmy

    The problem here is that the query is created with default settings to show unapproved documents -- only users with edit access can see unapproved documents. Add the bold line to your code and it will work.
    IDocumentManager docManager = prcSession.GetDocumentManager();IDocumentQuery docQuery = docManager.CreateQuery(iFolderID);docQuery.SetShowUnapproved(false);IObjectQuery queryResults = docQuery.Execute()

  • PreparedStatement and execute() method

    Hi to all.
    I would like to understand a thing.
    Why the execute() method gives me back false also if the SQL instructions is well executed?
    Is this right?
    TIA
    Omar

    Returns:
    true if the first result is a ResultSet object; false if the first result is an update count or there is no result
    http://java.sun.com/j2se/1.4.2/docs/api/java/sql/PreparedStatement.html#execute()

  • How can I execute method of Component for name

    Hello,
    My program has JInternalFrame with some components. Write me please - how can I execute method of Component for name of Component ?
    Like this:
    ... findObject("jTextArea1").cut();
    Thank you in advance.

    just cycle through the container's components until
    you find one where getName equals "jTextArea1"Thank you for your answer.
    I'm creating components in runtime (I add panel+JTextArea in JTabbedPane) and I don't know how many components will be in JTabbedPane.
    I know only it's names.
    I wan't to execute metod JTextaRea_n_.cut() via using JTextaRea_n_.Name.
    How ?

  • Send a mail to manager in execute method of my eventhandler class.

    Hi everyone,
    I want send an email in execute method of my eventhandler class.
    How can I do this?
    Thanks
    Regards.

    You can use JavaMail, or tcEmailOperations and the NotificationResolver to send email notification. Not sure what help you are looking on this.
    -Bikash

  • Execute method of IWDPDFDocumentCreationContext throwing error

    Hi All
    I am using NWDS2004s SPS10
    I need to generate a pdf. I am using "IWDPDFDocumentCreationContext" Interface to create the pdf from given xml and xdp. When i use the "execute" method of the interface it throws me following error.
    webdynpro.clientserver.adobe.pdfdocument.base.core.PDFDocumentRuntimeException: PDFDocument Processor failed to process Render Request.
         at com.sap.tc.webdynpro.clientserver.adobe.pdfdocument.base.core.PDFDocumentRuntimeException.<init>(PDFDocumentRuntimeException.java:25)
         at com.sap.tc.webdynpro.clientserver.adobe.pdfdocument.base.core.PDFDocumentProcessor.process(PDFDocumentProcessor.java:55)
         at com.sap.tc.webdynpro.clientserver.adobe.pdfdocument.base.core.PDFDocumentCreationContext.execute(PDFDocumentCreationContext.java:146)
         at com.sap.tc.webdynpro.clientserver.adobe.pdfdocument.base.core.PDFDocumentCreationContext.execute(PDFDocumentCreationContext.java:170)
         at com.sap.tc.webdynpro.clientserver.adobe.pdfdocument.impl.PDFDocumentCreationContextWDImpl.execute(PDFDocumentCreationContextWDImpl.java:94)
    Please help.
    Regards
    Sonal Mangla

    Hi Deepak
    We are getting exactly the same error. We have also created OSS message for the same.
    It would really help if you can post the solution.
    Thanks & Regards
    Rupesh

  • Execute Method must not return a resultSet

    Hi.
    I am using DataModifyQuery to insert a record in MS SQL. On that Table there is one trigger defined whcih in turn insert data into some other table. in case there is any error the trigger return a error message.
    When i execute the Sql with DataModifyQuery and there is a error return from the trigger then Toplink gives me a error message.
    Execute Method must not return a resultSet
    how can i over come this sistuation.
    Thanks.

    Nadir wrote:
    I was lost. Right, there was no return statement. Below works now
    public String getIPAddress(){
    String hostip = "";
    try {
    hostip = InetAddress.getLocalHost().getHostAddress();
    System.out.println("ip is "+hostip);
    } catch (UnknownHostException e) {
    hostip = e.getMessage();
    return hostip;
    -----It compiles. I wouldn't say it works. If I call a method getIPAddress(), I expect the String I get back to be an IP address. I don't want to have to parse it to determine that it's not an error message. That defeats the whole purpose of the exception mechanism. If that method can't get the IP address, it should throw an exception. In this case, there's no reason to catch the exception; just let it propagate up out of that method.
    Beginners often seem to think that exceptions are something that just arose on their own out of the language, and the designers had to add try/catch in order to be able to stop them from preventing our code executing. That's not the case. They were deliberately added to the language as a better way of indicating an error than checking return values at every step.

  • Execute method is undefined for Request_ZBpProjectGetlist2.

    I created a webservice for a BAPI and imported to Web Dynpro DC using Web Service Model.
    But I am getting an error in wdContext.currentRequest_ZBpProjectGetlist2Element().modelObject().execute();
    It says Method execute() is undefined for Request_ZBpProjectGetlist2.
    Can anyone help me why the execute method is not available for webservice model...

    Hi Sridhar,
    Please check execute method available for Request_ZBpProjectGetlist2 or not.
    Organize your import and check Request_ZBpProjectGetlist2 is imported or not.
    BR
    Arun

  • Does anyone has a method of  getting a certain file?

    Can anyone help me? I need a method in getting a certain file. Thank you in advance.

    Ok, for exmple you could do something like this :
    read the file line by line
    add each line to an ArrayList
    for each line increment a counter
    return the counter
    ArrayList lines = new ArrayList();
      public static int process(String pathToFile) {
        File file = new File(pathToFile);
        int counter = -1;
        if (file.isFile()) {
          counter++;
          try {
            BufferedReader reader = new BufferedReader(new FileReader(file));
            String line;
            while ( (line = reader.readLine()) != null) {
              lines.add(line);
              counter++;
            reader.close();
          catch (IOException ioe) {
            ioe.printStackTrace();
        return counter;
    }

Maybe you are looking for