Create a Time-Based Upkeep
Create powerful automation for your smart contract using time schedules without having to create Automation-compatible contracts. This guide explains how to register time-based upkeeps.
Using the Chainlink Automation app
In the Chainlink Automation App, click the blue Register new Upkeep button.
Connecting your wallet
If you do not already have a wallet connected with the Chainlink Automation network, the interface will prompt you to do so. Click the Connect Wallet button and follow the remaining prompts to connect your wallet to one of the Automation supported blockchain networks.
Trigger selection
Select Time-based trigger.
Using time-based triggers
When you select the time-based trigger, you are prompted to enter a contract address. Provide the address of the contract you want to automate. If you did not verify the contract on chain, you will need to paste the Application Binary Interface (ABI) of the deployed contract into the corresponding text box. Select the function name that you want to execute and provide any static inputs. If you want to use dynamic inputs please see Custom logic Upkeeps
Specifying the time schedule
After you have successfully entered your contract address and ABI, specify your time schedule in the form of a CRON expression. CRON expressions provide a shorthand way of creating a time schedule. You can use the provided example buttons in the Automation app to experiment with different schedules. Then, create your own time schedule.
Cron jobs are interpreted according to this format:
┌───────────── minute (0 - 59)
│ ┌───────────── hour (0 - 23)
│ │ ┌───────────── day of the month (1 - 31)
│ │ │ ┌───────────── month (1 - 12)
│ │ │ │ ┌───────────── day of the week (0 - 6) (Sunday to Saturday)
│ │ │ │ │
│ │ │ │ │
│ │ │ │ │
* * * * *
All times are in UTC.
- can be used for range e.g. "0 8-16 * * *"
/ can be used for interval e.g. "0 */2 * * *"
, can be used for list e.g. "0 17 * * 0,2,4"
Special limitations:
* there is no year field
* no special characters: ? L W #
* lists can have a max length of 26
* no words like JAN / FEB or MON / TUES
After entering your CRON expression, click Next.
Entering upkeep details
Provide the following information in the Automation app:
- Upkeep name: This will be visible in the Chainlink Automation app.
- Gas limit: This is the maximum amount of gas that your transaction requires to execute on chain. This limit cannot exceed the
performGasLimit
value configured on the registry.
- Starting balance (LINK): Specify a LINK starting balance to fund your upkeep. See the LINK Token Contracts page to find the correct contract address and access faucets for testnet LINK. This field is required. You must have LINK before you can use the Chainlink Automation service.
- Your email address (optional): This email address will be used to send you an email notification when your upkeep is underfunded.
Complete upkeep registration
Click Register upkeep and confirm the transaction in MetaMask.
Your upkeeps will be displayed in your list of Active Upkeeps. You must monitor the balance of your upkeep. If the balance drops below the minimum balance, the Chainlink Automation Network will not perform the Upkeep. See Managing Upkeeps to learn how to manage your upkeeps.