AppSignal Check-ins make it possible to monitor practically any recurring or continuous action within your application, including background jobs like cron jobs and scheduled tasks. In this guide, we'll show you how to use AppSignal Check-ins to optimize the performance of these processes in your application.
Check-ins allow you to monitor background processes like cron jobs or continuous processes:
AppSignal Check-ins can help you answer questions like:
Both Cron and Heartbeat Check-ins are designed to notify you of issues, allowing you to avoid silent failures in your critical background tasks and providing an extra layer of performance observability.
Check-ins are especially useful for monitoring cron jobs, background jobs, and continuous processes.
In theory, you can monitor anything that can communicate with AppSignal via our integration packages or API. However, we recommend using Check-ins to monitor background processes within your stack where AppSignal can provide you with the insights needed to troubleshoot issues effectively.
For example, if you manage a high-volume application, such as an online store processing thousands of sales each day, you could implement a Heartbeat Check-in every time a purchase is made. This way, AppSignal can alert you if your sales channel falls silent after a specified duration, alerting you to a potential problem within your application or it's integrations.
To get started, create a Check-in in the AppSignal app. You can do this by clicking on the Check-ins feature in the AppSignal navigation.
Here, you can create a Cron or Heartbeat Check-in and provide all the information AppSignal needs to track your background process for you, such as the following:
weekly_invoice_sync
. We advise choosing a clear, descriptive and memorable name.After creating your Check-ins identifier, keep the name readily available, as you'll need it when configuring your app to send Check-ins.
AppSignal's integrations come with built-in helper methods/functions that allow you to monitor background processes with minimal code.
In the example below, you can see how to send Cron Check-ins to AppSignal via our built-in helpers. Here, you'll need to specify the identifier of the Check-in you are tracking.
Our Heartbeat helpers enable you to monitor continuous processes with just a few lines of code:
To enable continuous Heartbeats, use the { continuous: true }
option in the Heartbeat helper method. When continuous is set to true
, a heartbeat will be sent to AppSignal every 30 seconds, providing ongoing monitoring of a process's lifespan.
You can read more about sending Check-ins via helpers in our documentation.
You can also monitor Check-ins via our API endpoint, which allows you to create Check-ins for processes beyond your app's codebase.
To perform Cron Check-ins, send a cURL or HTTP request to our Cron Check-in endpoint:
https://appsignal-endpoint.net/check_ins/cron
Below are examples of a Cron Check-in API request using cURL and HTTP:
For Heartbeat Check-ins you can post to the following endpoint:
https://appsignal-endpoint.net/check_ins/heartbeat
Below are two examples of a Heartbeat Check-in API request, one using cURL and the other using HTTP:
You can read more about sending Check-ins via API in our documentation.
The Check-ins overview page allows you to manage and track your application's Check-ins in real-time. Here, you can create, modify, and delete Check-ins and view Check-in occurrence history.
Occurrence-level insights make it easy to see how Check-ins are performing and if and when a Check-in has failed, helping you ensure that should things go wrong, you can take corrective action accurately, such as re-running a failed scheduled job.
AppSignal has the tools developers need to monitor their applications, giving them timely and critical insights into their app's performance and warning them when things go wrong.
Now that you've learned how you Check-ins can help you monitor your application's background processes, you can:
Do you have a monitoring-related question our guides don't answer? Let us know, and we'll help you answer it!
AppSignal offers a 30-day free trial, no credit card is required. All features are available in all plans. Start monitoring your application in just a few clicks!