Cron check google
This commit is contained in:
parent
6bc4829788
commit
8ca367e83b
@ -166,7 +166,7 @@ end
|
||||
function on_binlog_replay_end ()
|
||||
started = 1
|
||||
-- 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
|
||||
end
|
||||
|
||||
@ -187,7 +187,7 @@ function cron_plugins()
|
||||
|
||||
for name, desc in pairs(plugins) do
|
||||
if desc.cron ~= nil then
|
||||
print("croned!"..desc.description)
|
||||
print(desc.description)
|
||||
desc.cron()
|
||||
end
|
||||
end
|
||||
|
@ -1,10 +1,10 @@
|
||||
socket = require("socket")
|
||||
|
||||
function cron()
|
||||
-- Checks a TCP connexion
|
||||
-- Use yours desired web and id
|
||||
local addr = "gul.es"
|
||||
local addr = "www.google.com"
|
||||
local dest = "user#id"..our_id
|
||||
-- Checks a TCP connexion
|
||||
local connexion = socket.connect(addr, 80)
|
||||
if not connexion then
|
||||
local text = "ALERT: "..addr.." is offline"
|
||||
|
Reference in New Issue
Block a user