Skip to content

MultipleMachinesJobScheduler.RunScheduler only start first machine, after restart all machines start #27

@Metin-Gunduz

Description

@Metin-Gunduz

I have implemented a scheduler to communicate with multiple machines sequentially. The machines are working well individually. However, I'm encountering an issue with the code below when running the scheduler:

`

   private void button2_Click(object sender, EventArgs e)
    {
        errortext = "";
        MultipleMachinesJobScheduler.RunScheduler(comm.channels.Select(x => x.machine).ToList(), async (machine, scheduler) =>
        {
            scheduler.From(machine.Id + ".From", machine, MachineDataType.CommunicationTag).Result.Query(machine.Id + ".ConsoleQuery", QueryConsole).Result.To(machine.Id + ".To", machine).Result.Deal(machine.Id + ".Deal", OnSuccess, OnFailure).Result.Run();
        },
        -1, 0);

    }
    private void button3_Click(object sender, EventArgs e)
    {
        MultipleMachinesJobScheduler.CancelJob();
    }

`

Issue Description:

  • On the first button click, only the first machine in the array starts communicating, whereas all machines are expected to start.
  • Without making any changes to the code, if I run function (click the button) again, all machines start communicating as intended.

Expected Behavior:

  • All machines in the array should start communicating on the first button click.

Environment:

  • Scheduler version: v1.4.3
  • Development environment: Visual Studio 2022

Question: What could be causing this behavior where only the first machine starts on the initial click, and how can I ensure that all machines start communicating on the first run?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions