Hello,
it would be very nice if you could give me a hint for
the following problem:
I have a plain normal class X (no inheritance) with a
plain normal main() method that is started periodically
from jcrontab. However, the code run from main()
sometimes runs very long (which is perfectly ok), with
the effect that jcrontab starts a new instance of X
while the old has not finished yet.
Is there anything in jcrontab that I could use in class
X to see if there is already an instance of X running
so that I can let X terminate silently and have only
one instance of X running at a time? Maybe I can inhert
from some jcrontab class that provides a method?
I'd like to avoid a solution based on lockfiles or
scanning the process table or anything like that.
Thanks a lot for your help.