2

I need to create a package, which should add itself to list of cron jobs, and remove it from that list on deinstallation.

How can I do it without possibility of screwing the crontab file? Maybe there are some utils?

1 Answer 1

7

Instead of adding your lines to a crontab, you should just place a file inside /etc/cron.d/. See https://help.ubuntu.com/community/CronHowto#Advanced_Crontab:

The second type of crontab is to be found in /etc/cron.d. Within the directory are small named crontabs. The directory is often used by packages, and the small crontabs allows a user to be associated with the commands in them.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .