{
    my $freq = $Learn{cron} || 'none';
    my $min = int(rand(60));
    my $hour = int(rand(5));
    my $learn = '/usr/bin/Learn.pl';    
    if ($freq eq 'hourly') {
	return "$min * * * * root $learn\n";
    } elsif ($freq eq 'daily') {
	return "$min $hour * * * root $learn\n";
    } elsif ($freq eq 'weekly') {
	return "$min $hour * * 0 root $learn\n";
    } elsif ($freq eq 'monthly') {
	return "$min $hour 15 * * root $learn\n";
    } else {
	 return "# Learn auto-exec disabled\n";
    }
}
