Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: Monitoring program

  1. #1
    Member
    Join Date
    Feb 2010
    Location
    Dehradun, India
    Posts
    37
    Thanks
    1
    Thanked 7 Times in 6 Posts

    Exclamation Monitoring program

    Hi all,

    I have written one java program which downloads one xml from server and stores that in my local disk.

    This java program is being run through a cron in Linux every one minute.

    I want to monitor in linux that if somehow the java program takes more than one minute then the next cron entry should not start.

    Can this be done through JAVA??

    Is their any monitoring classes or something.??

    Or it can be done in LINUX??

    Please help

    Thanks in Advance


  2. #2
    Super Moderator Json's Avatar
    Join Date
    Jul 2009
    Location
    Warrington, United Kingdom
    Posts
    1,282
    My Mood
    Happy
    Thanks
    70
    Thanked 158 Times in 154 Posts

    Default Re: Monitoring program

    You could just rewrite the program slightly so instead of running it as a cron job you just have it running ALL the time and then in the program you set up a timer to download the xml every 1 minute and then you can do the check your self if a download is already in progress.

    // Json

  3. #3
    Member
    Join Date
    Feb 2010
    Location
    Dehradun, India
    Posts
    37
    Thanks
    1
    Thanked 7 Times in 6 Posts

    Default Re: Monitoring program

    Hi Json,

    I done that also through Quartz API but my client does not want this..

    He wants that i should run it from cron only...