Changing the query to look for LIKE returned results.Cubert wrote: ↑Tue May 30, 2023 5:13 pm Also lets look at the name your using.
Patch Install - Test Workstations (DoD)
Try modifying the SQL QUERY to look for name "LIKE" and see if you maybe get a different name. I.E an extra space or some char that was unexpected.
Code: Select all
SELECT a.ComputerID, b.day, b.starttime, b.CustomAction FROM v_dv_patchgroupassignment a LEFT JOIN installsoftwarepolicies b on a.PatchingGroupInstallPolicy = b.Name WHERE PatchingGroupName LIKE '%Workstations%(DoD)%' and ComputerID IN (Select a.ComputerID FROM computers a WHERE a.LastContact > date_add(now(),interval -5 minute) and a.OS LIKE '%Windows%' and a.OS NOT LIKE '%Server%' and a.ClientID IN (SELECT ID FROM extrafielddata WHERE ExtraFieldID = (SELECT ID FROM extrafield WHERE `Name` = 'Enable Habitat Announce Maintenance') and `Value` = '1'))
Habitat Announce Maintenance Tool
-
- Posts: 22
- Joined: Tue May 23, 2023 4:10 pm
- 1
Re: Habitat Announce Maintenance Tool
Re: Habitat Announce Maintenance Tool
Problem # 1 Day = 8
When day = 8 this means in Automate "EveryDay". 0-7 is Sunday - Saturday and 8 represents every day.
Problem #2 Patch Group Name does not match Name
Your names are mismatched so you are also failing this test.
So first thing to fix is why day is not showing a date from 0-7
Not sure why name would be different from name listed here?
When day = 8 this means in Automate "EveryDay". 0-7 is Sunday - Saturday and 8 represents every day.
Problem #2 Patch Group Name does not match Name
Your names are mismatched so you are also failing this test.
So first thing to fix is why day is not showing a date from 0-7
Not sure why name would be different from name listed here?
Re: Habitat Announce Maintenance Tool
We made a new name change to group and successfully query agent list afterwards. So We need to look further into why your name is not the same from point to point.
We can make some modifications to the query to look for 8 as a day, I will need to look at how Automate manages dates outside of Day Of Week. So I am not to concerned about the day issue.
We can make some modifications to the query to look for 8 as a day, I will need to look at how Automate manages dates outside of Day Of Week. So I am not to concerned about the day issue.
-
- Posts: 22
- Joined: Tue May 23, 2023 4:10 pm
- 1
Re: Habitat Announce Maintenance Tool
Ok so it appears for this SQL query to return data I had to change the update policy to specifically run on Friday (today). It does not like when I use the custom option and choose second, third, fourth friday. Which would definitely create a little more manual work and changing the policies for our three groups monthly. Waiting to see if I get the notice at 10am.
- Attachments
-
- ms update 1.png (50.99 KiB) Viewed 48400 times
-
- ms update 2.png (39.56 KiB) Viewed 48400 times
-
- hab sql 4.png (165.53 KiB) Viewed 48400 times
-
- Posts: 22
- Joined: Tue May 23, 2023 4:10 pm
- 1
Re: Habitat Announce Maintenance Tool
Welp no announcement went out still. But all of the sql queries are returning the correct data.
Re: Habitat Announce Maintenance Tool
Ok now lets look at an agents script logs? Did the script get scheduled? If so, When did it get scheduled? and what was the output of the script? (error/ succeed) and any script logs.
Lets also check your scripts version as we did update script with latest build.
The script looks for user to be logged into console. If so, it should then send a pop up yes/no box with your message. If they select yes we log that they acknowledged message.
The script is pretty basic, It looks for a console user, if no user it exits as no one to announce to...
If user is on console then it jumps to SQL query to get you message from database. We verify we have a message record then jump to sending the message. We take data from the query (Title and Message) and we bind that to a variable and then using a built in Automate script function we pop open a question box with a yes/no button with your message and title assigned. We then test to see if user clicks yes or no and we log that click.
If you look over script we log at every jump and during messaging so the agent script logs should have at least one log from script in it. Can you post those logs so we can see where in script it stopped?
Lets also check your scripts version as we did update script with latest build.
The script looks for user to be logged into console. If so, it should then send a pop up yes/no box with your message. If they select yes we log that they acknowledged message.
The script is pretty basic, It looks for a console user, if no user it exits as no one to announce to...
If user is on console then it jumps to SQL query to get you message from database. We verify we have a message record then jump to sending the message. We take data from the query (Title and Message) and we bind that to a variable and then using a built in Automate script function we pop open a question box with a yes/no button with your message and title assigned. We then test to see if user clicks yes or no and we log that click.
If you look over script we log at every jump and during messaging so the agent script logs should have at least one log from script in it. Can you post those logs so we can see where in script it stopped?
-
- Posts: 22
- Joined: Tue May 23, 2023 4:10 pm
- 1
Re: Habitat Announce Maintenance Tool
Ok so it appears that it scheduled the script for 13 computers on Saturday at 1230pm. It should have went out on Friday (day 6) at that time. Script is version 1.0.1.34.
- Attachments
-
- hab ann maint sched script.png (205.82 KiB) Viewed 48353 times
-
- hab ann maint sched script 2.png (513.31 KiB) Viewed 48353 times
Re: Habitat Announce Maintenance Tool
Can you confirm that this is still the accurate settings for your config? I>E you have same day selected?
-
- Posts: 22
- Joined: Tue May 23, 2023 4:10 pm
- 1
Re: Habitat Announce Maintenance Tool
Yes it is still set for same day. Only other thing I changed was the group name to take out the parenthesis around DoD. Maybe Friday is day 5 not 6?
- Attachments
-
- hab message.png (134.69 KiB) Viewed 48348 times
Re: Habitat Announce Maintenance Tool
Yeap after a little more investigating
Visual Studios used DayOfWeek in a 0-6 format and Of course Automate uses 1-7 format. We needed to add a 1 to it along with a if >7 revert back to 1.
Build 1.0.1.35 will have this fix in it. Allow me a few hours to get it posted up.
Visual Studios used DayOfWeek in a 0-6 format and Of course Automate uses 1-7 format. We needed to add a 1 to it along with a if >7 revert back to 1.
Build 1.0.1.35 will have this fix in it. Allow me a few hours to get it posted up.