ScheduledTasks

All tasks scheduled with the standard Windows scheduler are listed in this table.

Data field

Data type

Data description

id_snapshot

number

Identifier of the network snapshot.

server_name

string

Netbios name of the server without the two preceding backslash characters.

TaskName

string

Name of the job file

NextRunTime

date

Next run time. A null value means never.

LastRunTime

date

Last run time. A null value means never.

StartCode

number

Error code if the task did not start. If the value is 0 the task successfully started.

ExitCode

number

Exit code of the started process. If the value is not 0 a problem occured during the execution.

Command

string

Executable file to start.

Arguments

string

Arguments for the executable.

WorkingFolder

real

Working folder for the executable

MaxRunTime

real

Max run time in days.

Flags

number

Task flags. See Appendix 1

Status

number

Task status. See Appendix 2

RunAs

string

Execution account for the process

Schedule

string

Description of the schedule

Appendix 1 Task flags

Symbolic name

Bit value

Description

TASK_FLAG_INTERACTIVE

0x1

 

TASK_FLAG_DELETE_WHEN_DONE

0x2

The work item will be deleted when there are no more scheduled run times.

TASK_FLAG_DISABLED

0x4

The work item is disabled. This is useful to temporarily prevent a work item from running at the scheduled time(s).

TASK_FLAG_START_ONLY_IF_IDLE

0x10

The work item begins only if the computer is not in use at the scheduled start time. Windows 95 only.

TASK_FLAG_KILL_ON_IDLE_END

0x20

The work item terminates if the computer makes an idle to non-idle transition while the work item is running.

TASK_FLAG_DONT_START_IF_ON_BATTERIES

0x40

The work item does not start if its target computer is running on battery power. Windows 95 only.

TASK_FLAG_KILL_IF_GOING_ON_BATTERIES

0x80

The work item ends, and the associated application quits if the work item's target computer switches to battery power. Windows 95 only.

TASK_FLAG_RUN_ONLY_IF_DOCKED

0x100

 

TASK_FLAG_HIDDEN

0x200

The work item is hidden. When the work item begins execution, it runs in a hidden window.

TASK_FLAG_RUN_IF_CONNECTED_TO_INTERNET

0x400

The work item runs only if there is currently a valid Internet connection.

TASK_FLAG_RESTART_ON_IDLE_RESUME

0x800

The work item starts again if the computer makes a non-idle to idle transition before all the work item's task_triggers elapse.

TASK_FLAG_SYSTEM_REQUIRED

0x1000

 

TASK_FLAG_RUN_ONLY_IF_LOGGED_ON

0x2000

 

Appendix 2 Tasks status

Symbolic name

Value

Description

SCHED_S_TASK_NOT_SCHEDULED

0x00041305

The work item is ready to run at its next scheduled time.

SCHED_S_TASK_RUNNING

0x00041301

The work item is currently running.

SCHED_S_TASK_READY

0x00041300

One or more of the properties that are needed to run this work item on a schedule have not been set.