Hi Tonn,
I understand that you are getting the Machine 5 – times job 2 the same color as the Machine 1/2 - times job 1.
To assign positions, change colors, or modify the legend for each job over time, regardless of the machine, I suggest utilizing a file exchange that offers the functionality you require. One such option is to use the "ganntChart(_, Name, Value)" function, which allows you to assign different colors to each job.
Here is the link to the MATLAB File Exchange:
Hope this resolves your query!