Package pulp :: Package server :: Module crontab :: Class CronTab
[hide private]
[frames] | no frames]

Class CronTab

source code

object --+
         |
        CronTab

Crontab object which can access any time based cron using the standard.

user = Set the user of the crontab (defaults to $USER) fake_tab = Don't set to crontab at all, set to testable fake tab variable.

Instance Methods [hide private]
 
__init__(self, user=None, fake_tab=None)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
read(self)
Read in the crontab from the system into the object, called automatically when listing or using the object.
source code
 
write(self)
Write the crontab to the system.
source code
 
render(self)
Render this crontab as it would be in the crontab.
source code
 
new(self, command='', comment='')
Create a new cron with a command and comment.
source code
 
find_command(self, command)
Return a list of crons using a command.
source code
 
remove_all(self, command)
Removes all crons using the stated command.
source code
 
remove(self, item)
Remove a selected cron from the crontab.
source code
 
_read_execute(self)
Returns the command line for reading a crontab
source code
 
_write_execute(self, path)
Return the command line for writing a crontab
source code
 
_user_execute(self)
User command switches to append to the read and write commands.
source code
 
__iter__(self) source code
 
__unicode__(self) source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, user=None, fake_tab=None)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

read(self)

source code 

Read in the crontab from the system into the object, called automatically when listing or using the object. use for refresh.

write(self)

source code 

Write the crontab to the system. Saves all information.

new(self, command='', comment='')

source code 

Create a new cron with a command and comment.

Returns the new CronItem object.