2.13. get_crontab_contents module

get_crontab_contents.add_crontab_line()[source]

Add crontab line to cron table

get_crontab_contents.delete_crontab_line(called_from_cron)[source]

Delete crontab line after job is complete i.e. either SUCCESS/FAILURE but not IN PROGRESS status

get_crontab_contents.get_crontab_contents(called_from_cron)[source]

#———————————————————————– # # This function returns the contents of the user’s # cron table as well as the command to use to manipulate the cron table # (i.e. the “crontab” command, but on some platforms the version or # location of this may change depending on other circumstances, e.g. on # Cheyenne, this depends on whether a script that wants to call “crontab” # is itself being called from a cron job). Arguments are as follows: # # called_from_cron: # Boolean flag that specifies whether this function (and the scripts or # functions that are calling it) are called as part of a cron job. Must # be set to “TRUE” or “FALSE”. # # outvarname_crontab_cmd: # Name of the output variable that will contain the command to issue for # the system “crontab” command. # # outvarname_crontab_contents: # Name of the output variable that will contain the contents of the # user’s cron table. # #———————————————————————–

get_crontab_contents.parse_args(argv)[source]

Parse command line arguments for deleting crontab line. This is needed because it is called from shell script