-
1. Re: need help with scheduler
peterj Dec 13, 2007 5:20 PM (in response to bb_app)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? -
2. Re: need help with scheduler
bb_app Dec 14, 2007 1:28 PM (in response to bb_app)thanks a lot for the reply. But, read somewhere the max is 36000. Tried to change it. But, didn't run. Any clue?
-
3. Re: need help with scheduler
peterj Dec 15, 2007 7:49 PM (in response to bb_app)I looked in the source. There is no such restriction (as far as I can tell).
-
4. Re: need help with scheduler
bb_app Dec 17, 2007 9:43 AM (in response to bb_app)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?? -
5. Re: need help with scheduler
peterj Dec 17, 2007 11:35 AM (in response to bb_app)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. -
6. Re: need help with scheduler
bb_app Dec 17, 2007 11:47 AM (in response to bb_app)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.
any clue? -
7. Re: need help with scheduler
peterj Dec 17, 2007 11:58 AM (in response to bb_app)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. -
8. Re: need help with scheduler
bb_app Dec 17, 2007 1:15 PM (in response to bb_app)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 -
9. Re: need help with scheduler
peterj Dec 17, 2007 1:31 PM (in response to bb_app)I already hinted at a possible solution - modify or extend the existing scheduler class to do what you want. It should be relatively simple.