Looks like it is in milliseconds. So you need to enter:
1000 (milli/sec) x 60 (sec/hr) x 24 (hr/day) x 7 (day/week)
Got a calculator handy?
thanks a lot for the reply. But, read somewhere the max is 36000. Tried to change it. But, didn't run. Any clue?
I looked in the source. There is no such restriction (as far as I can tell).
Thnx peter... now it works .... but, do you know how to make it work on a particular day of the week.. say.. particularly monday or tuesday......?
Is there sth that I can add to the code??
To do this, you will have to do date arithmetic. Get the current time, convert to milliseconds, get the scheduled date, convert to milliseconds, and then subtract the two. The result is what to set SchedulePeriod to.
This is so much easier in .Net which provides classes and methods to do date arithmetic.
I think you got my question wrong. All I want is to start the scheduler on a particular day every week....there isn't just one scheduled date. This should go on every week.
Try this. As an example, to schedule each Monday at noon:
Set initialStartDate to "12/17/2007 12:00" (use a valid date string for your locale)
Set schedulePeriod to 1 week (in milliseconds, of course)
That should work if you start the server today (at least in my time zone). But if you restart the server in a week or two, I don't know if it will automatically adjust the start time based on the period, I could not tell from a casual reading of the source code. My suggestion is to try it with an old date, maybe adding some logging statements to the code, and see what happens in that case. After all, you have the full source code for the scheduler class. And if it doesn't work right. you can always change the code.
Peter, thanks for the quick reply ... I appreciate that.. I suggested the same and they dont want it that way. All I need is to set it to a particular day ... say .. ask the scheduler to run every monday or tuesday... They say they want it that way so that they can change it with ease and also monitor only on that particular day of the week...so i dont think I can use the date format...
Have you any idea ?? I tried to find a sol. ...and I couldn't
I already hinted at a possible solution - modify or extend the existing scheduler class to do what you want. It should be relatively simple.