-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
is it possible to avoid certain absolute dates? #4
Comments
I have a similar problem: |
You can use a Later exception schedule with the full date constraint to make certain absolute time periods unavailable:
Or if you want to just make blocks of time unavailable, you can do that as well:
Or
|
I would have thought so but this example does not seem to work: var later = require('later') var today = new Date(Date.UTC(2015,6,15,6,0,0)) var startExclusion = new Date(Date.UTC(2015,6,15,6,30,0)) schedule.date.UTC(); var tasks = [ // Define a set of resources var resources = [ r1]; r1.availablility = later.parse.recur() // Create the schedule for all of the tasks console.log("Today", today.toISOString()) for(var id in s.scheduledTasks) { *** Output> Today 2015-07-15T06:00:00.000Z
|
May need to add a valid schedule to your exception schedule (recur().every(1).minutes().except()...). You should use Laterjs to validate the resource schedule to make sure it produces what you think it should. The fullDate() constraint isn't documented because it was never fully tested unfortunately and may not be working correctly with exception schedules. |
Ney, Sorry!
|
r1.availablility = later.parse.recur() did not work either
|
Hey Bill, I think I fixed one problem but I have a fundamental question for you. When I say this: I expect that the first task could run from 6:00 until 6:30 and the second task after 7:00
|
The |
But a task that ends at 6:30am should be ok, right?
|
Yes, a task that ends at 6:30 should be treated internally as ending immediately before 6:30 and should not conflict. When the scheduler schedules a task, it basically just adds a new From resource-manager.js:
|
Sorry but I cannot get it to run. Pat Cappelaere Cell: 410 340 4868
|
Sorry about that. I'm no longer using this code and only left it posted in case it might be helpful to somebody else. Looks like there are definitely issues so I wouldn't suggest relying on this code for anything important. |
I'm looking at a use case where I defined availabilities, tasks and generate them.
However, sometime in the future I might come back and with those same availabilities try to generate more tasks, being aware of the previous batch of tasks.
So say , for an elevator that is available between 16:00 - 20:00, I would like to be able to input and "remember" that there is a reservation already on Monday 14:00 - 14:15
The text was updated successfully, but these errors were encountered: