Return the task's ID number in the scheduler it's registered to.
If not associated with any scheduler, the result should be -1.
-1
This task's ID number in its registered scheduler.