Cron check google
This commit is contained in:
parent
6bc4829788
commit
8ca367e83b
@ -166,7 +166,7 @@ end
|
|||||||
function on_binlog_replay_end ()
|
function on_binlog_replay_end ()
|
||||||
started = 1
|
started = 1
|
||||||
-- Uncomment the line to enable cron plugins.
|
-- Uncomment the line to enable cron plugins.
|
||||||
-- postpone (cron_plugins, false, 1.0)
|
-- postpone (cron_plugins, false, 5.0)
|
||||||
-- See plugins/ping.lua as an example for cron
|
-- See plugins/ping.lua as an example for cron
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -187,7 +187,7 @@ function cron_plugins()
|
|||||||
|
|
||||||
for name, desc in pairs(plugins) do
|
for name, desc in pairs(plugins) do
|
||||||
if desc.cron ~= nil then
|
if desc.cron ~= nil then
|
||||||
print("croned!"..desc.description)
|
print(desc.description)
|
||||||
desc.cron()
|
desc.cron()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
socket = require("socket")
|
socket = require("socket")
|
||||||
|
|
||||||
function cron()
|
function cron()
|
||||||
-- Checks a TCP connexion
|
|
||||||
-- Use yours desired web and id
|
-- Use yours desired web and id
|
||||||
local addr = "gul.es"
|
local addr = "www.google.com"
|
||||||
local dest = "user#id"..our_id
|
local dest = "user#id"..our_id
|
||||||
|
-- Checks a TCP connexion
|
||||||
local connexion = socket.connect(addr, 80)
|
local connexion = socket.connect(addr, 80)
|
||||||
if not connexion then
|
if not connexion then
|
||||||
local text = "ALERT: "..addr.." is offline"
|
local text = "ALERT: "..addr.." is offline"
|
||||||
|
Reference in New Issue
Block a user