LabTech Support Forums

Groups scripts/software resets every week

This forum is for discussion of group related issues.

Moderator: jware.connectwise

Groups scripts/software resets every week

Postby cciecka.c-cured » Tue Jan 24, 2012 9:46 am

So I added a few scripts to run on daily/weekly/etc basis in the group section and every sunday I have to readd them again because they go away.

Anyone else have this kind of problem?
cciecka.c-cured
Newbie
Newbie
 
Posts: 48
Joined: Sat May 14, 2011 1:54 pm

Re: Groups scripts/software resets every week

Postby janson.johnanson » Tue Jan 24, 2012 10:08 am

i have seen this as well over the last 2 weeks for sure. I added 2 additional srcipts to the All Agents group. and every Sunday they are gone and need to be added again.
janson.johnanson
Sr. Member
Sr. Member
 
Posts: 261
Joined: Wed Dec 31, 1969 8:00 pm

Re: Groups scripts/software resets every week

Postby teamits » Tue Jan 24, 2012 12:44 pm

This is a known bug, at least in 41.199 and 41.202 (not sure about 41.189). Apparently they aren't going to issue a fix until the 2012 release due in April-ish.

Support gave me a "PopulateOldScriptsWithNew" stored procedure (below), and then you have to run a script on your Labtech server every Sunday morning.

For lurkers, this bug effectively silently deletes all scripts added to any group since 41.199 was installed, each week. Old scripts are left. (hmm, not sure if they bring back any that were deleted...?) A horrible bug.


Ah, found their message:

If you have sqlyog or something similar you can create a stored procedure in the Labtech database with the follwoing snip.

DELIMITER ;;
CREATE PROCEDURE `PopulateOldScriptsWithNew`()
BEGIN
insert ignore into scripts() SELECT scriptID, 0, ScriptName, '0,', '', 1, '', '', '', '0,', 0, 0, ScriptGUID, 0, 0, 0, 0 from lt_scripts where scriptID not in (select ScriptID from scripts);
END;;
DELIMITER ;

Then you can create a script in labtech that will be one line that is an if True. The line will be an SQL Execute and the parameter will be: Call PopulateOldScriptsWithNew;

Then schedule this to run weekly as a client maintenance script on sundays @ 1AM and then with any new scripts created in that week they will not be removed from the group joins.

This is the current resolve that we have until the 2012 release where this will be addressed in the code.
Steve
teamits
Hero Member
Hero Member
 
Posts: 1577
Joined: Wed Dec 31, 1969 8:00 pm

Re: Groups scripts/software resets every week

Postby cciecka.c-cured » Mon Feb 06, 2012 4:46 pm

Steve is correct, this is a known bug that is not to be addressed until the next release. Support finally supplied the fix you make note of. I am on week two running the fix and it looks like all is well now.
cciecka.c-cured
Newbie
Newbie
 
Posts: 48
Joined: Sat May 14, 2011 1:54 pm

Re: Groups scripts/software resets every week

Postby teamits » Mon Feb 06, 2012 4:50 pm

One thing I noticed today...I ran a script on a client with 20 PCs on Saturday but 10 were off. I had thought scripts hung around for a few days before timing out and being removed from the queue, but none of them ran the script this morning when the rest were turned on. Not sure if that is related...?
Steve
teamits
Hero Member
Hero Member
 
Posts: 1577
Joined: Wed Dec 31, 1969 8:00 pm

Re: Groups scripts/software resets every week

Postby cciecka.c-cured » Wed Feb 08, 2012 7:57 am

Depends how you scheduled it. If we are talking the groups interface there is a checkbox that says run only at this time which would not let it hang out. I have never been under the impression that a script scheduled in the client area via the right click menus would run if the system is not live when you fire it.
cciecka.c-cured
Newbie
Newbie
 
Posts: 48
Joined: Sat May 14, 2011 1:54 pm

Re: Groups scripts/software resets every week

Postby teamits » Wed Feb 08, 2012 11:45 am

cciecka wrote:Depends how you scheduled it. If we are talking the groups interface there is a checkbox that says run only at this time which would not let it hang out. I have never been under the impression that a script scheduled in the client area via the right click menus would run if the system is not live when you fire it.


If you don't select that checkbox to run only at that time, it will save the scripts for a while because we issue updates on Tuesday night and the PCs that are off run them Wednesday morning when they are turned on. (the version we have doesn't seem to honor the "Isolated Script" checkbox but that's a different issue). I believe the time period was three days, but I had set some Saturday morning that were no longer in the PC's Scripts tab on Monday. I will have to keep an eye on it I guess.
Steve
teamits
Hero Member
Hero Member
 
Posts: 1577
Joined: Wed Dec 31, 1969 8:00 pm

Re: Groups scripts/software resets every week

Postby david.gerke.doherty » Thu May 17, 2012 3:45 pm

Hey there,

Is anyone else able to comment on how long scripts "hang around" for?

Coming from Kaseya I could deploy software / update custom fields very successfully like this (ie don't skip if offline) so when a machine would finally come online I could be assured that the script would then run.

Ironically this is how we deployed LabTech.

Maybe having a script deadline would help with this.
david.gerke.doherty
Newbie
Newbie
 
Posts: 10
Joined: Tue Apr 17, 2012 6:30 pm

Re: Groups scripts/software resets every week

Postby teamits » Thu May 17, 2012 3:57 pm

This particular thread was about a nasty bug where v2011.2 would "forget" each weekend that you scheduled scripts for a groups. Somehow it remembered pre-2011.2 scripts, thankfully, but any added later were lost each week, without this stored procedure. Support has assured me it's fixed in v2012.

In answer to your question scripts will eventually "expire" or stop waiting. I think they will wait for three days? It's at least two, we have some upgrade scripts that are waiting from Tuesday evening.
Steve
teamits
Hero Member
Hero Member
 
Posts: 1577
Joined: Wed Dec 31, 1969 8:00 pm


Return to Group Management

Who is online

Users browsing this forum: No registered users and 3 guests