Format:Windows Task Scheduler job (.job)
| On this wiki | Facts · Code · Notes · Topics |
|---|
The legacy Task Scheduler 1.0 .job file (Windows NT 4 to XP, still read by later versions): a 68-byte fixed section (product version, UUID, application name offset, triggers offset, flags, last run time) followed by length-prefixed UTF-16 strings, user data, reserved data and 48-byte triggers.
Layout from libyal/dtformats documentation/Job file format.asciidoc (GFDL text; it cites MS-TSCH and the .JOB File Format of MSDN). Little endian, system time structures, UTF-16LE strings without BOM.
Fixed size section (FIXDLEN_DATA, 68 bytes)
| Offset | Size | Field |
|---|---|---|
| 0 | 2 | product version |
| 2 | 2 | format version |
| 4 | 16 | job identifier (UUID, little endian) |
| 20 | 2 | application name offset (from file start) |
| 22 | 2 | triggers offset (from file start) |
| 24 | 2 | error retry count |
| 26 | 2 | error retry interval (minutes) |
| 28 | 2 | idle deadline (minutes) |
| 30 | 2 | idle wait (minutes) |
| 32 | 4 | priority |
| 36 | 4 | maximum run time (milliseconds) |
| 40 | 4 | exit code |
| 44 | 4 | status |
| 48 | 4 | flags |
| 52 | 16 | last run time, a SYSTEMTIME (year, month, weekday, day, hours, minutes, seconds, ms; 2 bytes each) or 0 |
Product versions (MS-TSCH values, approximate Windows API versions): 0x0400 NT 4.0, 0x0500 2000, 0x0501 XP, 0x0600 Vista, 0x0601 7, 0x0602 8, 0x0603 8.1, 0x0a00 10. Priority: 0x20 normal, 0x40 high, 0x80 idle, 0x100 realtime. Status: 0x41300 ready, 0x41301 running, 0x41305 not scheduled.
Flags: 0x1 interactive, 0x2 delete when done, 0x4 disabled, 0x10 start only if idle, 0x20 kill on idle end, 0x40 do not start on batteries, 0x80 kill if going on batteries, 0x100 run only if docked (unused), 0x200 hidden, 0x400 run if connected to internet (unused), 0x800 restart on idle resume, 0x1000 system required, 0x2000 run only if logged on, 0x01000000 application name defined.
Variable section
Running instance count (2 bytes), then application name, parameters, working directory, author, comment (each: 2-byte character count including the terminator, then UTF-16LE), user data (2-byte size, data), reserved data (2 bytes size, 0 or 8; with 8: start error HRESULT and task flags), triggers (2-byte count, then 48-byte triggers) and an optional 68-byte job signature (version 1, minimum client version 1, 64 signature bytes; per the source: MD5 of owner SID + job UUID + application name, signed).
Trigger (48 bytes): size 48, reserved, start year/month/day, end year/month/day, start hour/minute, duration and interval in minutes, flags (1 has end date, 2 kill at duration end, 4 disabled), type (0 once, 1 daily, 2 weekly, 3 monthly date, 4 monthly day of week, 5 on idle, 6 at system start, 7 at logon) and three type specific 16-bit values. The source marks the type data as TODO.
Code & repositories
- https://github.com/libyal/dtformats @
308ce8c38df2eb95a71b6e832b3f9803f0c4b169· license: Apache-2.0 (declared by the contributor for the files used; GitHub reports Apache-2.0 (read from LICENSE; GitHub's API was busy) for the repository)
libyal data format specifications; documentation/Windows Recycle.Bin file formats.asciidoc, Windows Recycler file formats.asciidoc, Job file format.asciidoc, RecentFileCache.bcf format.asciidoc.
Tested on: source read, not run · checked 2026-10-19