11-13-2018 06:25 AM
Is there a way to distinguish specifically "System Tasks" from hsi.tasklist?
I was able to identify one of the system tasks and use the flags column value and pull back a list of other Tasks, but I wanted to verify if that's correct or not.
Thank you!
11-13-2018 10:13 AM
Hi Jonna,
This is a column where we leverage bitwise operators to set multiple flags in the column. The following query will return legacy System Tasks only:
SELECT * FROM hsi.tasklist
WHERE
flags & 64 = 64
AND
flags & 67108864 <> 67108864
If you want to return Unity System Tasks only, this query will do the trick:
SELECT * FROM hsi.tasklist
WHERE
flags & 67108864 = 67108864
If you wanted to return Legacy and Unity System Tasks, this query should return all of them:
SELECT * FROM hsi.tasklist
WHERE
flags & 64 = 64
This is probably more than you wanted, but I am hopefully the additional queries will help other inquiring minds. One more detail is that the queries above are for SQL Server specifically. An Oracle query would need to leverage the bitwise AND operator. Here's an example of what that would look like:
SELECT * FROM hsi.tasklist
WHERE
bitand(flags, 64) = 64;
Hope this helps!
Best,
Joel
06-14-2019 01:36 PM
Hi Joel - This is very helpful, could you also provide a method to identify ad hoc tasks in tasklist? Thanks!
eta: looks like it's bitand(flags,8192)=8192, but if someone can confirm that would be great.
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.