GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  CRON_EVENT_PREDICT.PLX (1)

.ds Aq ’

NAME

cron_event_predict - Reads a crontab file and predicts when event will/would have run

CONTENTS

SYNOPSIS

cron_event_predict.plx [ -h ] [ -f number ] [ -p number ] <crontab-filename>

DESCRIPTION

A simple utility program mainly written to provide a worked example of how to use the module, but also of some use in understanding complex or unfamiliar crontab files.

Reads the crontab specified and iterates over every line in it, predicting when each cron event in the crontab will run. Defaults to predicting the next 2 events.

These are the command line arguments:



        -h - show this help
        -f - how many events predited in the future. Default is 2
        -p - how many events predicted for the past. Default is 0.



Here’s an example, showing the default of the next 2 predicted occurences of the each cron job:



        dev~/src/cronevent > ./cron_event_predict.plx ~/bin/crontab
        # Original line: 1-56/5 * * * * /usr/local/mrtg-2/bin/mrtg /home/admin/mrtg/mrtg.cfg
        Thu Sep 26 00:41:00 2002 - predicted future event
        Thu Sep 26 00:46:00 2002 - predicted future event
       
        # Original line: 34 */2 * * * /home/analog/analogwrap.bash > /dev/null
        Thu Sep 26 02:34:00 2002 - predicted future event
        Thu Sep 26 04:34:00 2002 - predicted future event
       
        # Original line: 38 18 * * * /home/admin/bin/allpodscript.bash > /dev/null
        Thu Sep 26 18:38:00 2002 - predicted future event
        Fri Sep 27 18:38:00 2002 - predicted future event



And here’s an example showing past events too:



        dev~/src/cronevent > ./cron_event_predict.plx -f 1 -p 3 ~/bin/crontab
        # Original line: 1-56/5 * * * * /usr/local/mrtg-2/bin/mrtg /home/admin/mrtg/mrtg.cfg
        Thu Sep 26 00:41:00 2002 - predicted future event
        Thu Sep 26 00:36:00 2002 - predicted past event
        Thu Sep 26 00:31:00 2002 - predicted past event
        Thu Sep 26 00:26:00 2002 - predicted past event
       
        # Original line: 34 */2 * * * /home/analog/analogwrap.bash > /dev/null
        Thu Sep 26 02:34:00 2002 - predicted future event
        Thu Sep 26 00:34:00 2002 - predicted past event
        Wed Sep 25 22:34:00 2002 - predicted past event
        Wed Sep 25 20:34:00 2002 - predicted past event
       
        # Original line: 38 18 * * * /home/admin/bin/allpodscript.bash > /dev/null
        Thu Sep 26 18:38:00 2002 - predicted future event
        Wed Sep 25 18:38:00 2002 - predicted past event
        Tue Sep 24 18:38:00 2002 - predicted past event
        Mon Sep 23 18:38:00 2002 - predicted past event



Search for    or go to Top of page |  Section 1 |  Main Index


perl v5.20.3 CRON_EVENT_PREDICT.PLX (1) 2015-11-20

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.