# dtFabric format specification.
---
name: job
type: format
description: Windows Job file format
urls: ["https://github.com/libyal/dtformats/blob/main/documentation/Job%20file%20format.asciidoc"]
---
name: byte
type: integer
attributes:
  format: unsigned
  size: 1
  units: bytes
---
name: uint16
type: integer
attributes:
  format: unsigned
  size: 2
  units: bytes
---
name: uint32
type: integer
attributes:
  format: unsigned
  size: 4
  units: bytes
---
name: wchar16
type: character
attributes:
  size: 2
  units: bytes
---
name: system_time
type: structure
members:
- name: year
  data_type: uint16
- name: month
  data_type: uint16
- name: weekday
  data_type: uint16
- name: day_of_month
  data_type: uint16
- name: hours
  data_type: uint16
- name: minutes
  data_type: uint16
- name: seconds
  data_type: uint16
- name: milliseconds
  data_type: uint16
---
name: job_fixed_length_data_section
aliases: [FIXDLEN_DATA]
type: structure
urls: ["https://msdn.microsoft.com/en-us/library/cc248286.aspx"]
attributes:
  byte_order: little-endian
members:
- name: product_version
  data_type: uint16
- name: format_version
  data_type: uint16
- name: job_identifier
  type: uuid
- name: application_name_offset
  data_type: uint16
- name: triggers_offset
  data_type: uint16
- name: error_retry_count
  data_type: uint16
- name: error_retry_interval
  data_type: uint16
- name: idle_deadline
  data_type: uint16
- name: idle_wait
  data_type: uint16
- name: priority
  data_type: uint32
- name: maximum_run_time
  data_type: uint32
- name: exit_code
  data_type: uint32
- name: status
  data_type: uint32
- name: flags
  data_type: uint32
- name: last_run_time
  data_type: system_time
---
name: job_trigger_date
type: structure
members:
- name: year
  data_type: uint16
- name: month
  data_type: uint16
- name: day_of_month
  data_type: uint16
---
name: job_trigger_time
type: structure
members:
- name: hours
  data_type: uint16
- name: minutes
  data_type: uint16
---
name: job_trigger
type: structure
attributes:
  byte_order: little-endian
members:
- name: size
  data_type: uint16
- name: reserved1
  data_type: uint16
- name: start_date
  data_type: job_trigger_date
- name: end_date
  data_type: job_trigger_date
- name: start_time
  data_type: job_trigger_time
- name: duration
  data_type: uint32
- name: interval
  data_type: uint32
- name: trigger_flags
  data_type: uint32
- name: trigger_type
  data_type: uint32
- name: trigger_arg0
  data_type: uint16
- name: trigger_arg1
  data_type: uint16
- name: trigger_arg2
  data_type: uint16
- name: trigger_padding
  data_type: uint16
- name: trigger_reserved2
  data_type: uint16
- name: trigger_reserved3
  data_type: uint16
---
name: job_variable_length_data_section
type: structure
urls: ["https://msdn.microsoft.com/en-us/library/cc248287.aspx"]
attributes:
  byte_order: little-endian
members:
- name: running_instance_count
  data_type: uint16
- name: application_name_size
  data_type: uint16
- name: application_name
  type: string
  encoding: utf-16-le
  element_data_type: wchar16
  number_of_elements: job_variable_length_data_section.application_name_size
  elements_terminator: "\x00\x00"
- name: parameters_size
  data_type: uint16
- name: parameters
  type: string
  encoding: utf-16-le
  element_data_type: wchar16
  number_of_elements: job_variable_length_data_section.parameters_size
  elements_terminator: "\x00\x00"
- name: working_directory_size
  data_type: uint16
- name: working_directory
  type: string
  encoding: utf-16-le
  element_data_type: wchar16
  number_of_elements: job_variable_length_data_section.working_directory_size
  elements_terminator: "\x00\x00"
- name: author_size
  data_type: uint16
- name: author
  type: string
  encoding: utf-16-le
  element_data_type: wchar16
  number_of_elements: job_variable_length_data_section.author_size
  elements_terminator: "\x00\x00"
- name: comment_size
  data_type: uint16
- name: comment
  type: string
  encoding: utf-16-le
  element_data_type: wchar16
  number_of_elements: job_variable_length_data_section.comment_size
  elements_terminator: "\x00\x00"
- name: user_data_size
  data_type: uint16
- name: user_data
  type: stream
  element_data_type: byte
  elements_data_size: job_variable_length_data_section.user_data_size
- name: reserved_data_size
  data_type: uint16
- name: reserved_data
  type: stream
  element_data_type: byte
  elements_data_size: job_variable_length_data_section.reserved_data_size
- name: number_of_triggers
  data_type: uint16
