Earlier today I wrote about my Altiris Job Builder tool but when I tested the actual produced build job I noticed something weird: the job was scheduled but not executed.

I then tried to manually push a job to this server and that one executed fine.

When I clicked the Job I could see that it was scheduled:

Job1

But when I clicked the Server it wasn’t there:

Job2

Then I fired up SQL Server Management Studio and made a query on the computer table:

ComputerTable

Interesting results no? At least it’s clear what happens, AxSched schedules the job for the first computer that matches the given computername.

And in this case the computer is longer present in the console (it’s group_id is NULL). I assume this happened because I redeployed the Virtual Machine.

So we can fix the error by issueing a SQL Statement, let’s check first:

SQLCheck

Yep, that query is ok, so we can delete it.
CAUTION: BEFORE YOU CONTINUE MAKE A BACKUP OF THE DATABASE

DELETE FROM computer WHERE name = ‘cxnrd02’ AND group_id IS NULL

or to clean all:

DELETE FROM computer WHERE group_id IS NULL

My assumption was right, this fixed the problem!