LogoLogo
MidpointContact UsThe Docs are Wrong!
  • What is Midpoint
  • What actually is a midpoint?
  • Midpoint FAQs
  • Get Started
    • Sample Midpoints
      • Filecoin Filrep Oracle: Obtain miner reputations on-chain
      • Oracle: Call any API from a smart contract
      • Listener: Subscribe an internal service to any event
      • Data Feed: Stream a data feed on-chain at regular intervals
      • Data Bridge: Pass arbitrary messages between chains
      • Automation: Ensure a function is called at regular intervals
    • Videos
  • Using Midpoint
    • API Key
    • Midpoint CLI
    • GraphQL API
    • Dashboard
  • Core Concepts
    • Midpoints
      • Midpoint ID
      • Sources
      • Tasks
      • Source and Task Definitions
        • Secrets
        • Variables
        • Exclude Logs
        • Extracts
    • Requests
      • Request ID
      • Events
    • Credits and Payment
  • Sources
    • Startpoint Called
    • EVM Event Emitted
    • Cron Job Triggered
  • Tasks
    • Make HTTP Request
      • OAuth and Multi-Step Authentication
    • Call EVM Function
    • Transact to EVM Function
      • Security
    • Shift Decimal
  • More Reading
    • Chain IDs
    • Startpoints
    • Midpoint EOAs
  • Get in Touch
    • Contact Links
Powered by GitBook
On this page
  • Definition
  • Returned Values
  • Examples
  • Tips on Using Cron Job Triggered

Was this helpful?

  1. Sources

Cron Job Triggered

Triggers a midpoint on a regular interval defined by a crontab.

PreviousEVM Event EmittedNextMake HTTP Request

Last updated 2 years ago

Was this helpful?

The Cron Job Triggered source is used to schedule midpoints that are called at regular time-intervals.

This source can be used to trigger a midpoint hourly, daily, weekly, or on more specific time definitions (ex. Noon on the first of every month). GMT is used as the originating time for the cron job triggered source.

Definition

crontab: string # Required
extracts: [ 
    {
        name: string
        from: string 
    }
]
excludeLogs: [string]

crontab: String. A standard unix crontab. See for more information on crontabs.

extracts: See . Legal values:

  • Timestamp Unixtime of execution

  • Midpoint_ID See

  • Request_ID See

excludeLogs: See . Legal values:

  • TaskDefinition The complete definition of this task at runtime

Returned Values

This source does not return any values other than those explicitly expressed in extracts.

Examples

Start this midpoint every hour on the hour.

crontab: "0 * * * *"

Start this midpoint every six hours and only on weekdays.

crontab: "* */6 * * Mon-Fri"
extracts: [ 
    {
        name: Request_ID
        from: Request_ID
    }
]

Tips on Using Cron Job Triggered

This section is incomplete.

cron.help
extracts
Midpoint ID
Request ID
exclude logs