Anyway we can look to adding multi-tasking to script running?
For example, not all scripts have to run - one - after - the - other. So it would be nice to set some scripts to run in parallel.
Along with that same line of thought - if the list of pending task are long… it can keep me from running other task… so it would be great if task we run manually also ran in parallel as well.
While some of my request are long hull request… I would love to see this done sooner than later.
I’m not sure if we’d ever support parallel scripts. I’ve seen some cool implementations of script bundles, but that’s still typically a fancy way of doing script queues still since they run one at a time.
How often are you running into this where a long blocking script prevents you from running another?
We had a computer go down do to a boot loop. I sent out a tech to fix the issue. Tech was able to get the device backup. I wanted to run a script to check the file system… During that time to get the machine backup other scripts que up and resulted in me having to wait for all the task to finish before I could. Granted I know I can stop the que up task, but I still wanted to have these task to happen still.
I have a few long running scripts - one to scan for virus and others that test/fix file system. If I manually run these scripts they can delay the que again meaning I can’t run my scripts again if the scripts start queuing behind them
Another user started a script that is long running and then another tech goes to that same device and was unable to run any task because another tech was already using said device with other scripts.
A script gets lock up and I have to wait for the time out for that script before it will run other scripts. Such as getting the battery life of a device. This script might pause for a short while or until it errors out before another task/script can be ran or manually ran.
I have a few more - but those are use cases I run into a lot where I either have to stop other que scripts to run manually or vis vers. I run a lot of different task for different use cases, but yea it happens on the daily - or more like on the hourly I have to pause for a little bit so other things happen before I can continue doing more work.
Can I ask why not? Granted, I know it isnt fair to ask for say, but even I had a method for script parallel running because I know its kind of a big issue when you can’t do something if you have to wait for another script to finish. At the end of the day its just “threading” that has to be enable for the “task” to happen. Depending on the programming language you can also just use process to get around it as well both of these can be trigger by having a variable to split them out.
- When manually running a script - have it run in parallel so it can be started asap even if there are other que up task. This would fix at least some of the issues.
- When adding scripts in either the policy and/or at the device level give it the option to run in parallel as a optional setting sort of like how we have the offline skip option.
- By running them in parallel we should also see a improvement in how long it takes to finish que up scripts as more scripts can finish in a shorter time. So as more scripts/task get added - the less time it really takes for all them to be completed.
This is a great idea.
Though before Syncro tackle this, I’d like to see them reliably achieve scheduled scripts to run one at a time.
Yea I know, but depending on how they have everything setup - scheduled scripts timer code would happen before running the script in parallel. Aka, it would check the time it should run… then check if it can be ran in parallel meaning it could be added if its fix or not. More importantly, manual scripts/task should still be on a different “task que” over scheduled scripts so they can be ran outside without delay from other task.
Who knows, maybe it would fix it as well. I mean I can think of a reason why some of the longer time out que task might not be working is because a task took longer then excepted and thus miss the timer it should’ve hit - for example.
Problem is I dont have the longer task/script issues like some do… I only have a few weekly ones and they run just fine, but I also have been coding around some of the longer running scripts/task so they don’t cause too much of delay.
One of the scripts in a policy we have is merely to display a message on the users screen to remind them about Maintenance Monday.
On some machines, Syncro has trouble running this message script every Monday. I’ve seen some PCs that a couple of months have gone by without the message script being displayed. (Well, I can only assume the message isn’t displayed because the script history indicates that the script hasn’t been run).
Uh, by off chance - have you ran that script against that computer manually before?
All the computers (hundreds) we look after get the Maintenance Monday message.
The script is nothing more than
Broadcast-Message -Title "Maintenance Monday" -Message "blah blah blah"
I don’t see why it should matter if a script is run manually before.
IMO The Syncro scheduled script feature should work the same regardless of if a script has been run manually or not.
But this is merely one script with a problem.
We have other scripts that are setup for Maintenance Monday, and according to script histories on PCs they do not always run. They don’t always not run either. The situation varies between PCs and varies from week to week.
On Monday I had a customer ask me to setup a script to force a shutdown on a PC every night at 6pm.
Sure I said. I set it up in Syncro
According to the script history of the PC, the shutdown did not occur on Monday at 6pm or Tuesday at 6pm.
No error, no failure to run, no message at all in the script history.
No worries. I ask only because I have seen some scripts say they didnt run… even though they just time out. So I wonder if you had tried to do it manually with the same results. In your case it sounds purely random when it will or not.
Base off some of these results I wonder if you are being hit after some type of reset of the server… I know last time they had to restart something some of my scripts did miss a time … and I wonder if maybe that is the cause?
Also… I do wonder if its some how cause by policy as well… like devices with more than one assign. I have this weird glitch it will show one of my scripts twice (like its confused on what policy to run) and its random what script it runs twice. But at the same time I am not sure its just a visual glitch.
When I look at the script histories we can see the problem of some scripts randomly not running has occured since at least August.
My assumption was that it would improve with the changes Syncro was doing in AWS.
I’ve had some email from Ian that Syncro is aware of the problem and are working on building some internal tools to be able to measure the scale of the problem and figure out how best to fix it. From that I’d assume everyone is impacted to a greater or lessor degree.
Can’t say I am really impacted. Everything seems to be popping off correct for us, but I rather get this issue talk about than just swap under the rug:)
Hahaha, I really wish I could see their code and help out:) I feel like some of these issues are just someone forgot to check if time is less than time.now() type of issue xD
For lockups and things like that you can term scripts with a timeout. It’s 10 mins by default so there shouldn’t really be any “lockup” scenarios where something bombed and it just blocks all future scripts from running or anything like that.
It’s an interesting idea. I don’t think it’s ever been asked for before that I’ve seen.