cancel
Showing results for 
Search instead for 
Did you mean: 

SQL Query for User Group(s) Assigned to Unity Scheduler Workflow Timer Tasks

Roger_Linhart
Elite Collaborator
Elite Collaborator

I've got some experience writing a SQL query to check for Workflow Timers in Error Status but I'm not finding the table that records the User Groups associated with the task. For example: 

1 ACCEPTED ANSWER

Larissa_Armand
Elite Collaborator
Elite Collaborator

Roger,

 

Looks like that would be USERGSCHEDULERTASK joined to USERGROUP and SCHEDULERTASK.

View answer in original post

5 REPLIES 5

Larissa_Armand
Elite Collaborator
Elite Collaborator

Roger,

 

Looks like that would be USERGSCHEDULERTASK joined to USERGROUP and SCHEDULERTASK.

Hi Larissa.

 

I accepted your answer to give you credit because you're so helpful to this group. 😄

I gave up checking tables that started with hsi.schedule (Scheduled Tasks Service) before I got to hsi.scheduler. I checked my other script and was clued into the right table name and since I didn't find the cross reference table there I started looking for hsi.userg.

Roger_Linhart
Elite Collaborator
Elite Collaborator

I found it: hsi.usergschedulertask.

SELECT usergroupname AS 'Usergroup Name', schedtaskname AS 'Task Name'
FROM hsi.usergschedulertask AS ugst
INNER JOIN hsi.usergroup AS ug ON ugst.usergroupnum = ug.usergroupnum
INNER JOIN hsi.schedulertask AS st ON ugst.schedtasknum = st.schedtasknum
ORDER BY 'Task Name'

Brian_Espinosa
Champ on-the-rise
Champ on-the-rise

Where is this information on error state? I'm trying to find the information in the database where I can see a Workflow Timer in an Error State, like all in an error state.