Jay Roy
asked on
capturing program time
Hi guys
Is there a way in java to see what time of the day my program runs
For example my java program runs at 12Am, 7am, 6pm monday to saturday
through autosys scheduling tool.
So I need to have something like
If(java program is running at 12am){
// do something
}else if(java program is running at 7am){
//Do something else
}
What would be the best way to do this?
Any ideas would be greatly appreciated.
Thanks.
Is there a way in java to see what time of the day my program runs
For example my java program runs at 12Am, 7am, 6pm monday to saturday
through autosys scheduling tool.
So I need to have something like
If(java program is running at 12am){
// do something
}else if(java program is running at 7am){
//Do something else
}
What would be the best way to do this?
Any ideas would be greatly appreciated.
Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Yes - that would be the test for midnight (within an hour).
Doug
Doug
ASKER
so just to confirm , if its running at 12 AM, the condition should be
if(hours > 23 && hours < 1), correct ?