Task Setup Guide
Where does your task run?
To monitor your your task with Bringschuld you need to send an HTTP request to your task's unique URL when it finishes successfully. This works in any environment capable of making HTTP requests.
For your convenience, we have put together some code snippets to make your live easier. If your language of choice is not in the tabs above don't worry. Simply find out how to make an HTTP request to your task's URL:
Note that this snippet interprets "successfully" as "./mybackup.sh exits with exit code 0". Make sure that ./mybackup.sh only exits with exit code 0 if it completed successfully.
For more advanced usage of curl refer to the "Command Line" tab above.
To simply check in without doing anything fancy use:
To pass a message with your check in use the following:
To send a message containing the run time of your task, you can use:
This is useful if your task doesn't always start at the beginning of its Bringschuld interval.
To ignore the output from curling the URL you can tack on &> /dev/null at the end of any of the commands above.
The option --retry 10 lets curl retry a failing request up to ten times:
It is preferable to use HTTP instead of email check-ins wherever possible, as HTTP requests are easier to set up and quicker than email.
However, if you want to test that emails sent by your periodic tasks are finding their recipients you should use email check-ins. Tweak your email logic so it also sends an email to:
This way you will not only be alerted if the task fails to run, but also if there is something like an email queuing problem.
The Email's subject will be visible in the Bringschuld dashboard.
begin
Net::HTTP.get(URI.parse('https://www.bringschuld.io/check_in/yourTaskToken'))
rescue Exception => e
end
try:
urlopen('https://www.bringschuld.io/check_in/yourTaskToken')
except Exception:
pass
Using file_get_contents:
Using curl
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://www.bringschuld.io/check_in/yourTaskToken',
CURLOPT_TIMEOUT => 10,
));
curl_exec($curl);