Checa esto adaptalo a tu necesidad, saludos.
Código PHP:
<?php
$startDate = date("Y/m/d"); //aqui la fecha actual
$num = 30;
$endDate = "2013-06-10"; //aqui pones la fecha del proximo mantenimiento
list($year, $month, $day) = explode("/", $startDate);
$startDate = mktime(0, 0, 0, $month, $day, $year);
list($year, $month, $day) = explode("-", $endDate);
$endDate = mktime(0, 0, 0, $month, $day, $year);
$totalDays = ($endDate - $startDate)/(60 * 60 * 24);
echo $totalDays." Dias"."<br>";
if($totalDays == $num){
echo "Proximo a vencer";
}
?>