Skip to content
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

scheduling two tasks at the same time. #15

Open
mgoldenberg opened this issue Jul 30, 2017 · 6 comments
Open

scheduling two tasks at the same time. #15

mgoldenberg opened this issue Jul 30, 2017 · 6 comments

Comments

@mgoldenberg
Copy link

mgoldenberg commented Jul 30, 2017

Hi, I'm trying to schedule two tasks at the same time on the same date that both require a particular resource whose isNotReservable field is set to true. As far as I understand, these two tasks should not conflict with one another; however, I can't get something like this to work. To be more explicit, the following data results in the scheduler successfully scheduling t2, but failing to schedule t1:

let tasks = [{
    id: "t1",
    duration: 1,
    minLength: 1,
    resources: ["r1"],
    available: later.parse.text("after 1:00am and before 1:01am")
}, {
    id: "t2",
    duration: 1,
    minLength: 1,
    resources: ["r1"],
    available: later.parse.text("after 1:00am and before 1:01am")
}];

let resources = [{
    id: "r1",
    available: later.parse.text("after 1:00am and before 1:01am"),
    isNotReservable: true
}];

let start = new Date("2020-01-01");
let frequency = later.parse.text("on the 1 day of January in 2020");
let s = schedule.create(tasks, resources, frequency, start);

Is this expected behavior? Or, perhaps I'm doing something wrong?

@mgcox2
Copy link

mgcox2 commented Nov 22, 2017

@mgoldenberg Were you able to solve this? I'm running into the same problem in my early testing of this library. I know this project is no longer maintained but I haven't been able to find an alternative. Thanks in advance.

@mgoldenberg
Copy link
Author

@mgcox2: I tried and tried, but to no avail. If you manage to find a solution, do let me know.

@mgcox2
Copy link

mgcox2 commented Nov 29, 2017

@mgoldenberg: Try adding the priority option to your tasks. The task with the higher priority should be scheduled, the other should not.

@mgoldenberg
Copy link
Author

@mgcox2: the problem I had was not due to a priority issue as far as I can tell. It isn't that I want t1 scheduled as opposed to t2. It is that I want both scheduled at the same time. Since the resource has it's isNotReservable flag set to true, this should not be an issue.

@CiprianD
Copy link

@mgoldenberg have you found a solution to this issue?

@mgoldenberg
Copy link
Author

Unfortunately, I never did. I had started digging through the source, but then I got bored... alas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants