Skip to main content
2 of 2
added 11 characters in body

Triggering User Defined Jobs On-Chain

I have been working on this dapp lately that allow users to create a product with an expiration date (don't mind the specifics of the app). Once expired, a call to a smart contract should be made (transaction) and the product state should be changed to "expired". The question is - how to manage this task scheduling? I thought about building a mechanism on my own using smart contracts and off-chain services (similar to how Chainlink's model works) but I keep stumbling upon the gas fees require to trigger my contract on expiration. I also tried to figure out Chainlink's Automation but:

  1. They don't have mocks to test locally
  2. They offer a UI to register the "Upkeep" (their brand for the scheduled job) while I need to do it programmatically.

Please advice.

P.S: I could do all of this off-chain using microservices and regular databases, but obviously this misses the whole point