---
schema_version: "1"
id: 507c1994dd6ce6db66f6eda5818919c9ed6ee90d8ae41d85d1d476110a75e5ed
title: CronTrigger
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/object_reference/sforce_api_objects_crontrigger.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_crontrigger.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 5b3cb9a7400438b71938c20be584cdb2887f585dd5b19a193467f099b4c3d283
description: Contains schedule information for a scheduled job. CronTrigger is similar to a cron job on UNIX systems. This object is available in API version 17.0 and later.
---
# CronTrigger

Contains schedule information for a scheduled job. CronTrigger is similar to a cron job on UNIX systems. This object is available in API version 17.0 and later.

## Supported Calls

describeSObjects(), query(), retrieve()

## Fields

| Field | Details |
| --- | --- |
| CronExpression | 
Type

string

Properties

Filter, Group, Nillable, Sort

Description

The cron expression used to initiate the schedule.

Syntax:

Seconds Minutes Hours Day\_of\_month Month Day\_of\_week Optional\_year

See [schedule(jobName, cronExpression, schedulableClass)](https://developer.salesforce.com/docs/atlas.en-us.264.0.apexcode.meta/apexref/apex_methods_system_system.htm "HTML (New Window)") in the Apex Reference Guide.



 |
| CronJobDetailId | 

Type

reference

Properties

Filter, Group, Nillable, Sort

Description

The ID of the CronJobDetail record containing more details about this scheduled job.

This is a relationship field.

Relationship Name

CronJobDetail

Relationship Type

Lookup

Refers To

CronJobDetail



 |
| EndTime | 

Type

dateTime

Properties

Filter, Nillable, Sort

Description

The date and time when the job either finished or will finish.



 |
| NextFireTime | 

Type

dateTime

Properties

Filter, Nillable, Sort

Description

The next date and time the job is scheduled to run. null if the job is not scheduled to run again.



 |
| OwnerId | 

Type

reference

Properties

Filter, Group, Nillable, Sort

Description

Owner of the job.



 |
| PreviousFireTime | 

Type

dateTime

Properties

Filter, Nillable, Sort

Description

The most recent date and time the job ran. null if the job has not run before current local time.



 |
| StartTime | 

Type

dateTime

Properties

Filter, Nillable, Sort

Description

The date and time when the most recent iteration of the scheduled job started.



 |
| State | 

Type

string

Properties

Filter, Group, Nillable, Sort

Description

The current state of the job. The job state is managed by the system. Possible values are:

- WAITING—The job is waiting for execution.
- ACQUIRED—The job has been picked up by the system and is about to execute.
- EXECUTING—The job is executing.
- COMPLETE—The trigger has fired and is not scheduled to fire again.
- ERROR—The trigger definition has an error.
- DELETED—The job has been deleted.
- PAUSED—A job can have this state during patch and major releases. After the release has finished, the job state is automatically set to WAITING or another state.
- BLOCKED—Execution of a second instance of the job is attempted while one instance is running. This state lasts until the first job instance is completed.
- PAUSED\_BLOCKED—A job has this state due to a release occurring. When the release has finished and no other instance of the job is running, the job’s status is set to another state.





 |
| TimesTriggered | 

Type

int

Properties

Filter, Group, Nillable, Sort

Description

The number of times this job has been triggered.



 |
| TimeZoneSidKey | 

Type

picklist

Properties

Filter, Group, Nillable, Restricted picklist, Sort

Description

Returns the timezone ID. For example, America/Los\_Angeles.



 |

## Usage

Use this object to query scheduled jobs in your organization.