I am using void java.util.Timer.scheduleAtFixedRate(TimerTask task, long delay, long period) to execute a task at specified “period”.
I want to specify a period which is quite large – the period which is larger then max long value. i want to use double value to specify the period.
Can anyone help me to do is?
Is there any other possible way to execute the task at interval which is very long period.
Thanks
I am using void java.util.Timer.scheduleAtFixedRate(TimerTask task, long delay, long period) to execute a task
Share
yes its my mistake.
I was calculating repeat period in wrong way.
(7 * 24 * 60 * 60 * 1000) * 5 results in negative value.
After typecasting the answer to long it works fine.
(long)5 * 7 * 24 * 60 * 60 * 1000 gives correct value.
Thanks.