> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hedera.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Hedera Schedule Service

## Overview

The **Hedera Schedule Service (HSS) system contract** exposes functions that enable smart contracts to interact with Hedera's native schedule service. The schedule service allows transactions to be scheduled for future execution, simplifies multi-sig coordination, and automates execution once all required signatures are collected. This eliminates the need for off-ledger signature coordination and reduces the complexity of multi-sig workflows in decentralized applications (dApps).

Additionally, the HSS includes expiration handling, where scheduled transactions that fail to collect and verify all required signatures within the specified expiration window are automatically removed from the network.

The `IHederaScheduleService` interface, introduced in [HIP-755](https://hips.hedera.com/hip/hip-755), allows accounts to interact with the schedule transaction service via smart contracts. With the introduction of [**HIP-1215**](https://hips.hedera.com/hip/hip-1215), the HSS now supports generalized scheduled contract calls, allowing smart contracts to schedule arbitrary calls to other contracts (or themselves) directly from within the EVM. This powerful feature enables a wide range of decentralized automation use cases, such as:

<div className="flex flex-col justify-center items-center w-full mt-4 mb-8 not-prose">
  <a href="https://hips.hedera.com/hip/hip-1215" target="_blank" rel="noopener noreferrer" className="no-underline text-center cursor-pointer group w-full">
    <img src="https://mintcdn.com/hedera-0c6e0218/Vweqzv3VLyIzuzTj/images/core-concepts/smart-contracts/system-smart-contracts/hedera-schedule-service-hip-1215-hss.png?fit=max&auto=format&n=Vweqzv3VLyIzuzTj&q=85&s=3e2e484e09b0ba41d0fddf4764c8fb6d" alt="Hedera AI Studio" className="rounded-lg shadow-sm w-full h-auto mb-[5px]" noZoom width="1920" height="1080" data-path="images/core-concepts/smart-contracts/system-smart-contracts/hedera-schedule-service-hip-1215-hss.png" />

    <p className="text-gray-1000 dark:text-gray-500 text-base font-semibold mt-2 mb-0 text-center underline decoration-[#8853FF] decoration-1 underline-offset-[6px] transition-colors duration-200 group-hover:text-[#8853FF]">
      HIP-1215: Generalized Scheduled Contract Calls
    </p>
  </a>
</div>

* **DeFi Automation**: Automatically rebalancing a portfolio or harvesting yield farming rewards.
* **Vesting Schedules**: Creating token vesting contracts that automatically release tokens at specified intervals.
* **DAO Operations**: Scheduling recurring governance tasks, such as distributing rewards or executing proposals.

Following system contract conventions, HSS is callable at the reserved `0x16b` address and exposes the following functions callable within smart contracts.

<table><thead><tr><th width="210">Function Name</th><th width="120" align="center">Function Selector</th><th width="102" align="center">Consensus Node Release Version</th><th width="67" align="center">HIP</th><th>Function Interface</th></tr></thead><tbody><tr><td><code>authorizeSchedule</code></td><td align="center"><code>0xf0637961</code></td><td align="center"><a href="/learn/release-notes/services#release-v0.57">0.57</a></td><td align="center"><a href="https://hips.hedera.com/hip/hip-755">HIP 755</a></td><td><code>authorizeSchedule(address) external returns (int64 responseCode)</code></td></tr><tr><td><code>signSchedule</code></td><td align="center"><code>0x358eeb03</code></td><td align="center"><a href="/learn/release-notes/services#release-v0.59">0.59</a></td><td align="center"><a href="https://hips.hedera.com/hip/hip-755">HIP 755</a></td><td><code>signSchedule(address, bytes) external returns (int64 responseCode)</code></td></tr><tr><td><code>scheduleNative</code></td><td align="center"><code>0xca829811</code></td><td align="center"><a href="/learn/release-notes/services#release-v0.59">0.59</a></td><td align="center"><a href="https://hips.hedera.com/hip/hip-756">HIP 756</a></td><td><code>scheduleNative(address, bytes, address) external returns (int64, address)</code></td></tr><tr><td><code>getScheduledCreateFungibleTokenInfo</code></td><td align="center"><code>0xda2d5f8f</code></td><td align="center"><a href="/learn/release-notes/services#release-v0.59">0.59</a></td><td align="center"><a href="https://hips.hedera.com/hip/hip-756">HIP 756</a></td><td><code>getScheduledCreateFungibleTokenInfo(address) external returns (int64, FungibleTokenInfo)</code></td></tr><tr><td><code>getScheduledCreateNonFungibleTokenInfo</code></td><td align="center"><code>0xd68c902c</code></td><td align="center"><a href="/learn/release-notes/services#release-v0.59">0.59</a></td><td align="center"><a href="https://hips.hedera.com/hip/hip-756">HIP 756</a></td><td><code>getScheduledCreateNonFungibleTokenInfo(address) external returns (int64, NonFungibleTokenInfo)</code></td></tr><tr><td><code>scheduleCall</code></td><td align="center"><code>0x6f5bfde8</code></td><td align="center"><a href="/learn/release-notes/services#release-v0.68">0.68</a></td><td align="center"><a href="https://hips.hedera.com/hip/hip-1215">HIP 1215</a></td><td><code>scheduleCall(address, uint256, uint256, uint64, bytes) external returns (int64, address)</code></td></tr><tr><td><code>scheduleCallWithPayer</code></td><td align="center"><code>0xe6599c18</code></td><td align="center"><a href="/learn/release-notes/services#release-v0.68">0.68</a></td><td align="center"><a href="https://hips.hedera.com/hip/hip-1215">HIP 1215</a></td><td><code>scheduleCallWithPayer(address, address, uint256, uint256, uint64, bytes) external returns (int64, address)</code></td></tr><tr><td><code>executeCallOnPayerSignature</code></td><td align="center"><code>0x105772b2</code></td><td align="center"><a href="/learn/release-notes/services#release-v0.68">0.68</a></td><td align="center"><a href="https://hips.hedera.com/hip/hip-1215">HIP 1215</a></td><td><code>executeCallOnPayerSignature(address, address, uint256, uint256, uint64, bytes) external returns (int64, address)</code></td></tr><tr><td><code>deleteSchedule</code></td><td align="center"><code>0x72d42394</code></td><td align="center"><a href="/learn/release-notes/services#release-v0.68">0.68</a></td><td align="center"><a href="https://hips.hedera.com/hip/hip-1215">HIP 1215</a></td><td><code>deleteSchedule(address) external returns (int64)</code></td></tr><tr><td><code>deleteSchedule</code></td><td align="center"><code>0xc61dea85</code></td><td align="center"><a href="/learn/release-notes/services#release-v0.68">0.68</a></td><td align="center"><a href="https://hips.hedera.com/hip/hip-1215">HIP 1215</a></td><td><code>deleteSchedule() external returns (int64)</code></td></tr><tr><td><code>hasScheduleCapacity</code></td><td align="center"><code>0xdfb4a999</code></td><td align="center"><a href="/learn/release-notes/services#release-v0.68">0.68</a></td><td align="center"><a href="https://hips.hedera.com/hip/hip-1215">HIP 1215</a></td><td><code>hasScheduleCapacity(uint256, uint256) external view returns (bool)</code></td></tr></tbody></table>

#### **authorizeSchedule(address)**

* Signs the schedule transaction identified by the pass-in parameter (`address`) with a `ContractKey` using the format `0.0.<ContractId of the calling contract>`.
* Allows contracts to sign schedule transactions using their own contract key.
* Returns a `responseCode` indicating the success or failure of the authorization attempt.

#### **signSchedule(address schedule, bytes memory signatureMap)**

* Allows for the signing of a schedule transaction given a protobuf encoded signature map.
* The message signed by the keys is defined to be the concatenation of the shard, realm, and schedule transaction address.
* Returns a `responseCode` indicating the success or failure of the signature addition attempt.

#### **scheduleNative(address systemContractAddress, bytes memory callData, address payer)**

* Allows for the creation of a schedule transaction for a given system contract address, ABI-encoded call data, and payer address.
* Currently supports the Hedera Token Service System Contract (`0x167`) for token-related functions.
* Returns the `scheduleAddress` of the newly created scheduled transaction and a `responseCode`.

#### **getScheduledCreateFungibleTokenInfo(address scheduleAddress)**

* Returns the token information for a scheduled fungible token create transaction.
* `scheduleAddress`: The address of the scheduled fungible token create transaction.
* Returns a `responseCode` and an `IHederaTokenService.FungibleTokenInfo` struct.

#### **getScheduledCreateNonFungibleTokenInfo(address scheduleAddress)**

* Returns the token information for a scheduled non-fungible token create transaction.
* `scheduleAddress`: The address of the scheduled non-fungible token create transaction.
* Returns a `responseCode` and an `IHederaTokenService.NonFungibleTokenInfo` struct.

#### **scheduleCall(address to, uint256 expirySecond, uint256 gasLimit, uint64 value, bytes memory callData)**

* Schedules a contract call with the calling contract acting as the payer.
* `to`: The address of the contract to call.
* `expirySecond`: The epoch second at which the transaction should expire.
* `gasLimit`: The maximum amount of gas to use for the call.
* `value`: The amount of HBAR (in tinybars) to send with the call.
* `callData`: The ABI-encoded data for the function call.
* Returns a `responseCode` indicating success or failure (`22` for SUCCESS) and the `scheduleAddress` of the newly created scheduled transaction.

#### **scheduleCallWithPayer(address to, address payer, uint256 expirySecond, uint256 gasLimit, uint64 value, bytes memory callData)**

* Schedules a contract call with a specified payer address. This method collects the required signatures but **only executes the transaction at the `expirySecond` timestamp**, even if all signatures are gathered earlier. The payer must provide signatures before the transaction can execute.
* `to`: The address of the contract to call.
* `payer`: The address of the account that will pay for the transaction.
* `expirySecond`: The epoch second at which the transaction should expire.
* `gasLimit`: The maximum amount of gas to use for the call.
* `value`: The amount of HBAR (in tinybars) to send with the call.
* `callData`: The ABI-encoded data for the function call.
* Returns a `responseCode` indicating success or failure (`22` for SUCCESS) and the `scheduleAddress` of the newly created scheduled transaction.

#### **executeCallOnPayerSignature(address to, address payer, uint256 expirySecond, uint256 gasLimit, uint64 value, bytes memory callData)**

* Schedules and executes a contract call immediately upon receiving the payer's signature. This method also collects signatures, but **executes the transaction immediately once all required signatures are present**, without waiting for the `expirySecond` timestamp, unless the consensus time has already passed the `expirySecond`.
* `to`: The address of the contract to call.
* `payer`: The address of the account that will pay for the transaction.
* `expirySecond`: The epoch second at which the transaction should expire.
* `gasLimit`: The maximum amount of gas to use for the call.
* `value`: The amount of HBAR (in tinybars) to send with the call.
* `callData`: The ABI-encoded data for the function call.
* Returns a `responseCode` indicating success or failure (`22` for SUCCESS) and the `scheduleAddress` of the newly created scheduled transaction.

#### **deleteSchedule(address scheduleAddress)**

* Deletes a previously scheduled transaction.
* `scheduleAddress`: The address of the scheduled transaction to delete.
* Returns a `responseCode` indicating success or failure (`22` for SUCCESS).

#### **deleteSchedule()**

* Deletes a scheduled transaction by calling this parameter-less redirect function directly on the schedule's address.
* This provides a convenient alternative for contracts or Externally Owned Accounts (EOAs) to the main `deleteSchedule(address)` function.
* Returns a `responseCode` indicating success or failure (`22` for SUCCESS).

#### **hasScheduleCapacity(uint256 expirySecond, uint256 gasLimit)**

* A view function that checks if there is enough capacity on the network to schedule a contract call at a given time with a specified gas limit.
* `expirySecond`: The epoch second to check for capacity.
* `gasLimit`: The gas limit of the call to check for capacity.
* Returns `true` if there is capacity, `false` otherwise.
* For a reliable retry pattern, consider implementing a method similar to `findAvailableSecond()` as described in HIP-1215.

## Behavior and Costs

#### Behavior

* Scheduled transactions must collect all required signatures before they can be executed. These signatures can be added asynchronously using the `signSchedule` function.
* If all required signatures are not received within the specified expiration window, the transaction expires and is removed from the network.
* The execution of a schedule transaction occurs automatically when the final required signature is submitted.
* **Throttling and Capacity:** The main design concern for scheduled contract calls is managing network capacity. The `hasScheduleCapacity()` view function allows contracts to check if a given second has capacity to schedule a contract call with a specified gas limit. This enables contracts to find an acceptable second for execution with an affordable gas budget.
* **Return Values:** The new `scheduleCall` functions do not revert. On success, they return the address of the newly created scheduled transaction and a `SUCCESS` (22) response code. On failure, they return a zero address and a failure response code from the `ResponseCodeEnum`.

#### Costs

* Schedule transaction fees are the same as a HAPI sign schedule transaction, with a 20% markup for using system contracts.
* Fees include gas costs for EVM execution, storage costs, and network fees for consensus.
* Expired transactions cost no additional fees beyond the initial scheduling and signature costs.

<Card title="Gas and Fees | Hedera" href="/evm/development/gas-fees#gas-schedule-and-fee-calculation">
  Gas fee schedule and calculation
</Card>

### **Reference**

* [HIP-1215: Generalized Scheduled Contract Calls](https://hips.hedera.com/hip/hip-1215)
* [HIP-756: Contract Scheduled Token Create](https://hips.hedera.com/hip/hip-756)
* [HIP-755: Schedule Service System Contract](https://hips.hedera.com/hip/hip-755)
