Skip to content

Cron

[Source]

(Added by the Cron amendment.)

The Cron pseudo-transaction is automatically inserted into the ledger by the Cron engine when a scheduled Hook execution is due. This pseudo-transaction triggers the execution of the Hook on the account specified in the Owner field.

{
"TransactionType": "Cron",
"Account": "rrrrrrrrrrrrrrrrrrrrrhoLvTp",
"Fee": "0",
"LedgerSequence": 21225473,
"Sequence": 0,
"SigningPubKey": "",
"TxnSignature": "",
"Owner": "rWYkbWkCeg8dP6rXALnjgZSjjLyih5NXm"
}
FieldJSON TypeInternal TypeDescription
OwnerStringAccountIDThe account that owns the scheduled Hook execution. This is the account that will be invoked when the cron executes.
LedgerSequenceNumberUInt32The ledger index where this pseudo-transaction appears. This distinguishes the pseudo-transaction from other occurrences of the same change.

As a pseudo-transaction, Cron uses the standard pseudo-transaction values for common fields:

FieldValue
AccountrrrrrrrrrrrrrrrrrrrrrhoLvTp (ACCOUNT_ZERO)
Fee0
Sequence0
SigningPubKey"" (empty string)
TxnSignature"" (empty string)

When a Cron ledger object is ready to execute (based on its StartTime, DelaySeconds, and RepeatCount fields), the Cron engine automatically inserts a Cron pseudo-transaction into the ledger.

The pseudo-transaction contains an Owner field that references the account with the scheduled Hook. The Hook on that account will be invoked automatically, and the account is treated as a weak transactional stakeholder (TSH) during execution.

Important: Hook developers must enable collect calls (hsfCOLLECT flag) on their Hooks, as the Owner constitutes a weak transactional stakeholder when the Cron pseudo-transaction executes. The account must also have the asfTshCollect flag enabled.