Quartz and Windows Scheduled Task/Service

Discussion in 'Java' started by Alessandro, Feb 4, 2009.

  1. Alessandro

    Alessandro Guest

    Hi all,

    I have a java application started by a "bat" file which uses Quartz on
    a Windows system in order to be run every day at a certain time. It's
    clear that it has to be always on (like a service behaviour)

    1) starting it - executing bat file only the first time - , produces
    of course a dos window and there is the risk that someone could close
    it stopping all the schedules

    2) tried to convert bat file int windows service with tools
    instsrv.exe and srvany.exe but there is always a prompt windows open,
    closing it everything is freezed even if process is still running

    3) used a Schedled Task of Windows, starting every day some minutes
    before Quartz scheduled and with option of closing after e.g. 1hour of
    activity (that's sufficient). In this case there isn't the windows
    prompt open, but java.exe process remains live and every day there is
    a java.exe process more.

    Any experience about this ? Any suggestions or workaround ? I know
    this is a very typical scenario.

    Thanks and best regards,
    Ale
     
    Alessandro, Feb 4, 2009
    #1
    1. Advertisements

  2. Alessandro

    Arne Vajhøj Guest

    Alessandro wrote:
    > I have a java application started by a "bat" file which uses Quartz on
    > a Windows system in order to be run every day at a certain time. It's
    > clear that it has to be always on (like a service behaviour)
    >
    > 1) starting it - executing bat file only the first time - , produces
    > of course a dos window and there is the risk that someone could close
    > it stopping all the schedules
    >
    > 2) tried to convert bat file int windows service with tools
    > instsrv.exe and srvany.exe but there is always a prompt windows open,
    > closing it everything is freezed even if process is still running
    >
    > 3) used a Schedled Task of Windows, starting every day some minutes
    > before Quartz scheduled and with option of closing after e.g. 1hour of
    > activity (that's sufficient). In this case there isn't the windows
    > prompt open, but java.exe process remains live and every day there is
    > a java.exe process more.
    >
    > Any experience about this ? Any suggestions or workaround ? I know
    > this is a very typical scenario.


    Tell windows scheduler to start it at boot and let Quartz run
    when it should run.

    You could also find a service wrapper that works for you, but ...

    Arne
     
    Arne Vajhøj, Feb 5, 2009
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ian Walsh

    Scheduled Task in J2EE

    Ian Walsh, Sep 11, 2004, in forum: Java
    Replies:
    3
    Views:
    3,990
    Wei Jiang
    Sep 13, 2004
  2. knocker

    J2ME Scheduled task?

    knocker, Sep 20, 2004, in forum: Java
    Replies:
    2
    Views:
    778
    Darryl L. Pierce
    Sep 23, 2004
  3. SLEEPY LOLO

    Scheduled task

    SLEEPY LOLO, Feb 3, 2005, in forum: C++
    Replies:
    7
    Views:
    851
    Victor Bazarov
    Feb 4, 2005
  4. upin_cool
    Replies:
    0
    Views:
    5,070
    upin_cool
    May 15, 2006
  5. cksanjose

    Scheduled task using timer

    cksanjose, Oct 31, 2007, in forum: Java
    Replies:
    2
    Views:
    409
    Piotr Kobzda
    Oct 31, 2007
  6. Lucho
    Replies:
    5
    Views:
    3,934
    Andreas Leitgeb
    Jan 19, 2008
  7. korean_dave
    Replies:
    2
    Views:
    550
    Lawrence D'Oliveiro
    Oct 19, 2008
  8. suntrix7
    Replies:
    1
    Views:
    1,409
    John_Idol
    Jan 2, 2009
Loading...