Public Member Functions | |
def | __init__ |
def | addTask |
Adds a task to the crontab. | |
def | removeTask |
Removes a task to the crontab if it exists. | |
Private Member Functions | |
def | __convertTask |
Static Private Attributes | |
__user = None | |
__cfm = None | |
string | __crontabPath = "/usr/bin/crontab" |
string | __script = "/home/diana/conversor-wma-mp3" |
def CronHandler.CronHandler.__init__ | ( | self | ) |
def CronHandler.CronHandler.addTask | ( | self | ) |
Adds a task to the crontab.
Creates a temporal file with old tasks and new ones and then updates crontab. Only adds if task isn't in the crontab yet.
def CronHandler.CronHandler.removeTask | ( | self | ) |
Removes a task to the crontab if it exists.
Creates a temporal file with old tasks but the one to remove and then updates crontab. Only removes if task exist in the crontab. If it doesn't, the crontab doesn't change.
def CronHandler.CronHandler.__convertTask | ( | self, | ||
t | ||||
) | [private] |
CronHandler.CronHandler.__user = None [static, private] |
CronHandler.CronHandler.__cfm = None [static, private] |
string CronHandler.CronHandler.__crontabPath = "/usr/bin/crontab" [static, private] |
string CronHandler.CronHandler.__script = "/home/diana/conversor-wma-mp3" [static, private] |