How to get cron tasks output sent to HTTP webhook

  1. Enter your webhook URL:

    Cron tasks output would be sent in a POST request using the content-type text/plain.

  2. There are 2 main options how to get cron tasks output sent to HTTP webhook. Choose one of them.

    1. This option would work only if your server has been configured to send emails. You can check that, for example, by running: echo 'test' | mail -s "test" your@emailaddress.com If you get an email after that then it works. If not then just proceed to option B.

      Open crontab on your server: crontab -e

      Add MAILTO=0g4g8gc0kok4wwgwg888gw04kss404c0@ai.notifier.in variable at the beginning of the config. So it should look the following way: MAILTO=0g4g8gc0kok4wwgwg888gw04kss404c0@ai.notifier.in

      # Your cron tasks...

      to check the integration.
    2. This option requires cURL to be installed on your server. Check it by running: curl --version You should see something like that: curl 7.47.0 ... If that's not the case then you should install it first.

      Open crontab on your server: crontab -e

      If you'd like to be notified about all output (STDIN and STDERR) add the following code after each of your tasks: | curl -H "Content-Type: text/plain" --data-binary @- https://notifier.in/webhook/0g4g8gc0kok4wwgwg888gw04kss404c0 So it should look the following way: 2 3 * * * ./your_example_script.sh | curl -H "Content-Type: text/plain" --data-binary @- https://notifier.in/webhook/0g4g8gc0kok4wwgwg888gw04kss404c0
      9 * * * * ./your_another_example_script.sh | curl -H "Content-Type: text/plain" --data-binary @- https://notifier.in/webhook/0g4g8gc0kok4wwgwg888gw04kss404c0

      If you'd like to be notified only about error output (STDERR) add the following code after each of your tasks: 2>&1>/dev/null | curl -H "Content-Type: text/plain" --data-binary @- "https://notifier.in/webhook/0g4g8gc0kok4wwgwg888gw04kss404c0?ignoreEmptyBody=1" So it should look the following way: 2 3 * * * ./your_example_script.sh 2>&1>/dev/null | curl -H "Content-Type: text/plain" --data-binary @- "https://notifier.in/webhook/0g4g8gc0kok4wwgwg888gw04kss404c0?ignoreEmptyBody=1"
      9 * * * * ./your_another_example_script.sh 2>&1>/dev/null | curl -H "Content-Type: text/plain" --data-binary @- "https://notifier.in/webhook/0g4g8gc0kok4wwgwg888gw04kss404c0?ignoreEmptyBody=1"

      to check the integration.
In the free version you could receive up to 100 notifications per month. Create a paid account to receive up to 20,000 notifications.

Check other related integrations:

Miss some integration? Drop me a line with the request.