This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Java example of using API to notify CronSentry upon a job completion | |
// For API documentation please go to http://www.cronsentry.com/help#api | |
// The example uses Apache HttpComponents http://hc.apache.org/ | |
import java.util.ArrayList; | |
import java.util.List; | |
import org.apache.http.HttpEntity; | |
import org.apache.http.HttpResponse; | |
import org.apache.http.NameValuePair; | |
import org.apache.http.client.entity.UrlEncodedFormEntity; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// C# example of using API to notify CronSentry upon a job completion | |
// For API documentation please go to http://www.cronsentry.com/help#api | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using RestSharp; | |
class CronsentryNotifyApp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Ruby example of using API to notify CronSentry upon a job completion | |
# For API documentation please go to http://www.cronsentry.com/help#api | |
require 'open-uri' | |
require 'rest_client' | |
# set POST variables | |
url = 'http://api.cronsentry.com/api/v1/notifications' | |
api_key = 'YOUR_API_KEY' | |
job_name = URI::encode('Your job name') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Python example of using API to notify CronSentry upon a job completion | |
# For API documentation please go to http://www.cronsentry.com/help#api | |
import urllib | |
import requests | |
# set POST variables | |
url = 'http://api.cronsentry.com/api/v1/notifications' | |
parameters = { | |
'api_key' : 'YOUR_API_KEY', |