Results 1 to 4 of 4
  1. #1
    laungarth is offline Member
    Join Date
    Jul 2011
    Posts
    10
    Rep Power
    0

    Default how I am going to write process to execute batch jop on particular date.

    Hi every body,

    I have some question about how I am going to write process to execute batch job on particular date.

    Assumption:

    1. I need to write Action class which can execute batch process.

    2. It needs to has a condition.
    2.1 process will go back to check the last successful run date.
    2.1 when process found the date, it will start to run batch job from that date + 1 (next day of last successful run date) to system date - 1.

    (EX. Batch job was ran on last Friday but it fail to run on Sat and Sunday. So, we found out on next Monday. We need to run batch process for result on Saturday and Sunday)

    Thank you in advance.

    Newbie
    Last edited by laungarth; 07-06-2011 at 10:22 PM.

  2. #2
    doWhile is offline Moderator
    Join Date
    Jul 2010
    Location
    California
    Posts
    1,642
    Rep Power
    7

    Default

    A third post with the same question? You should read the forum rules
    How to write process to excute batch job on particular date.

  3. #3
    laungarth is offline Member
    Join Date
    Jul 2011
    Posts
    10
    Rep Power
    0

    Default

    My apology. I tried to withdraw it but I couldn't.

  4. #4
    lovelesh is offline Senior Member
    Join Date
    Nov 2010
    Location
    Delhi
    Posts
    135
    Blog Entries
    1
    Rep Power
    0

    Default

    I suggest using one of the following ways:

    1. Use Quartz scheduler to schedule your jobs (if tasks executes successfully, mark the status of that day's task in a status file, it will tell you where to start from in case of failure)
    2. User java provided Timertask (if your execution duration is fixed), you can take the execution duration from a properties file and can make it dynamic (above mentioned strategy can be used for status checking)
    3. If you are on Linux/Unix platform, cron can be used. (You will have to write scripts in this case)

    -
    lovelesh

Similar Threads

  1. Replies: 15
    Last Post: 07-07-2011, 08:58 PM
  2. Replies: 1
    Last Post: 07-06-2011, 09:19 PM
  3. Help how to write the date
    By kjiu in forum New To Java
    Replies: 2
    Last Post: 11-01-2009, 04:49 PM
  4. Replies: 2
    Last Post: 08-07-2007, 07:22 PM
  5. Replies: 1
    Last Post: 07-27-2007, 05:46 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •