Hi,
We have a batch queue processing system where we can submit jobs from the command line.
In my script, I want to schedule a job to run 1Hr from the current time. The syntax for our queue system is:
[blue]<queue master binary> -start dd/mm/yyyy.hh:mm[/blue]
I know I can use:
[blue]CURDATE=`date "+%d/%m/%Y.%X"`[/blue]
to give me the current date/time in the right format, but how can I increment it by 1 hr ?
I thought about using something like:
[blue]CURHOUR=`date "+%d/%m/%Y.%X" | cut -c 12-13`
NEW=`expr $CURHOUR + 1`[/blue]
But this wont account for things rolling past midnight (23:30 +1 = 24:30 ... invalid!).
We have a batch queue processing system where we can submit jobs from the command line.
In my script, I want to schedule a job to run 1Hr from the current time. The syntax for our queue system is:
[blue]<queue master binary> -start dd/mm/yyyy.hh:mm[/blue]
I know I can use:
[blue]CURDATE=`date "+%d/%m/%Y.%X"`[/blue]
to give me the current date/time in the right format, but how can I increment it by 1 hr ?
I thought about using something like:
[blue]CURHOUR=`date "+%d/%m/%Y.%X" | cut -c 12-13`
NEW=`expr $CURHOUR + 1`[/blue]
But this wont account for things rolling past midnight (23:30 +1 = 24:30 ... invalid!).