In this guide, you'll learn how to implement Stackery's built-in timer in a stack. For this example, you'll see how this would look in a basic stack consisting of an object store resource connected to a logging function and an error logging function. In a real world example, the timer might be useful for getting a daily report of an API endpoint.
To add a timer, select 'Timer' from the 'Add Resource' sidebar menu.
Then connect the new timer resource to the
LogErrors. Next, click on the timer to edit the settings.
Give the timer a name and set the timer type. In this example, we'll use Interval time. Stackery also has an option for Cron time. If you'd like to learn more about using
CronTrigger in your applications, check out this tutorial.
Finally, set the interval and interval unit. In this case, we'll leave the interval at 1 and select 'day(s)' for the unit. Finally, hit submit to save your changes.
And that's it! For your own project, you could connect this timer to a function that emails a report or a Slack message, for example.