Config Crontab
Details
| Last Update: | 2008-01-26 05:01:08 |
| Version: | Config::Crontab |
| License/Program Type: | Perl Artistic License |
| Publisher: | Scott Wiersdorf |
| Price: | $0.00 |
Description:
Config::Crontab is a Perl module used to read/write Vixie
compatible crontab files.
SYNOPSIS
use Config::Crontab;
making a new crontab from scratch
my $ct = new Config::Crontab;
make a new Block object
my $block = new Config::Crontab::Block( -data =>
<<_BLOCK_ > mail something to joe at 5 after
midnight on Fridays
MAILTO=joe
5 0 Fri /bin/someprogram 2>&1
_BLOCK_
add this block to the crontab object
$ct->last($block>
make another block using Block methods
$block = new Config::Crontab::Block;
$block->last( new Config::Crontab::Comment( -data =>
' do backups' ) > $block->last( new
Config::Crontab::Env( -name => 'MAILTO', -value => 'bob'
) > $block->last( new Config::Crontab::Event( -minute
=> 40,
-hour => 3,
-command => '/sbin/backup --partition=all' ) >
add this block to crontab file
$ct->last($block>
write out crontab file
$ct->write;
changing an existing crontab
my $ct = new Config::Crontab; $ct->read;
comment out the command that runs our backup
$_->active(0) for $ct->select(-command_re =>
'/sbin/backup'>
save our crontab again
$ct->write;
read joe's crontab (must have root permissions)
same as "crontab -u joe -l"
my $ct = new Config::Crontab( -owner => 'joe' >
$ct->read;
A Config::Crontab object allows you to manipulate an ordered
set of Event, Env, or Comment objects (also included with this
package). Descriptions of these packages may be found below.
In short, Config::Crontab reads and writes crontab(5) files
(and does a little pretty-printing too) using objects. The general
idea is that you create a Config::Crontab object and associate it
with a file (if unassociated, it will work over a pipe to crontab
-l). From there, you can add lines to your crontab object, change
existing line attributes, and write everything back to file.
NOTE: Config::Crontab does not (currently) do validity checks
on your data (i.e., dates out of range, etc.). However, if the call
to crontab fails when you invoke write, write will return undef and
set error with the error message returned from the crontab command.
Future development may tend toward more validity checks.
Now, to successfully navigate the module's ins and outs,
we'll need a little terminology lesson.
Requirements:
· Perl
0 comments
Add to
Config Crontab Version History
Related Software
|
|
From category: Libraries |
| Card Terminal Driver Library 20011112 is libraries software developed by Patrick Finnegan and Nolan Eakins. Card Terminal Driver Library aims to add support for smart card and magnetic stripe card... |
|
|
From category: Debuggers |
| JSwat is a graphical, stand-alone Java debugger, using the JPDA library.... |
|
|
From category: Version-Control |
| ArchWay 0.2.1 is version control software developed by Clint Adams. ArchWay is a full-featured graphical user interface for the GNU Arch revision control system. It includes a set of special... |
|
|
From category: Code-Generators |
| Greengrass is a C framework providing a high-level API for the Resource Description Framework (RDF).... |
|
|
From category: Version-Control |
| Convulsion 0.0.5 is version control software developed by Gavin Brown. Convulsion is a drop-in CVS repository browser for PHP. It makes use of the libraries developed for the Chora module of the Ho... |
|
|
From category: Libraries |
| cstring is a small and simple C library for the definition and manipulation of expandable C-style strings.... |
|
|
From category: Widgets |
| DiaCanvas2 0.14.3 is widgets software developed by Arjan J. Molenaar. DiaCanvas2 is a flexible diagramming widget. It is based on GnomeCanvas. It uses its own constraint solver to maintain relation... |
|
|
From category: Compilers |
| ccbuild 1.5.3 is compilers software developed by A. Bram Neijt. The ccbuild goal is to allow the developer to run only one command: ccbuild. ccbuild program will then find out what it should do on... |
|
|
From category: Libraries |
| dcache 0.6.2 is libraries software developed by Uwe Ohse. dcache is a database library implementing a persistent first-in-first-out cache. The database (or `cache\') size limits are configur... |
|
|
From category: Interpreters |
| The Frink Language is a calculating tool and programming language.... |
|
|
From category: Libraries |
| Firebolt 0.3.6 is libraries software developed by Kostas Katsamakas. Firebolt is a network protocol oriented library. Our goal is to create a simple and well designed object oriented network... |
|
|
From category: Libraries |
| Apache::MP3::Playlist 4.00 is libraries software developed by Lincoln Stein. Apache::MP3::Playlist can manage directories of MP3 files with sorting and persistent playlists. SYNOPSIS... |
|
|
From category: Libraries |
| Algorithm::Networksort 1.05 is libraries software developed by John M. Gamble. Algorithm::Networksort can create inline comparisons for sorting. SYNOPSIS use Algorithm::Networksort... |
|
|
From category: Perl-Modules |
| Lingua::Zompist::Cuezi is a Perl module to inflect Cuezi nouns, verbs, and adjectives.... |
|
|
From category: Libraries |
| Audio File Library 0.2.6 is libraries software developed by Michael Pruett. The Audio File Library provides a uniform and elegant API for accessing a variety of audio file formats, such as AIFF/AIF... |
Leave a comment