#!/usr/bin/perl -w use strict; # Delay in minutes (minutes * 60) my $INTERVAL = 30 * 60; open(STDERR,">logs.txt"); print STDERR "LOG started at : " . localtime(time) . "\n"; select STDERR; while (1) { sleep($INTERVAL); &check_logs; } sub check_logs { # some logs checking goes here then print out the output print STDERR "Logs Processed found : ???? at ????\n"; }