• The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

set cron job for automatic email sending

L

larvus

Guest
hi

i want to create php script as a cron job under plesk .

my script is servercheck.php , this script will check the website , if the server down it will will send a mail .



<?php
function pingDomain($domain){
$starttime = microtime(true);
$file = fsockopen ($domain, 80, $errno, $errstr, 10);
$stoptime = microtime(true);
$status = 0;
if (!$file) $status = -1; // Site is down
else {
fclose($file);
$status = ($stoptime - $starttime) * 1000;
$status = floor($status);
}
return $status;
}

$domainbase="www.example.com";
$status = pingDomain($domainbase);
if ($status == -1){
$headers = "From: [email protected]\r\n";
mail('[email protected]','Server Down','Anantix Server Down');

}
?>
i tried

Server->root->Scheduled tasks

Min H DM M DW Command
5,10,15,20,25,30,35,40,45,50,55 * * * * /usr/bin/php /var/www/vhosts/bio-world.com/httpdocs/test/php/servercheck.php

not working

pls help to setup this php script as a cron job.
 
Back
Top