I have a deployment script, it must add something to a user
crontab (trigger a script that clean logs every XXX days),
however this must only be done during the first deployment, or when it needs to be updated.
(I can run
xxx.py deploy env or
xxx.py update env)
so I have to do this:
Check if my cronJob already exist Put my cronJob if it does not already exist or update my cronjob if one of the parameter of the command is different
I don't see how to add/check/remove something to the
crontab without using
crontab -e or editing the
crontab file (download it, rewrite it, re-upload it)
PS : this is a user specific cronjob, "webadmin" is going to do it and he should not use sudo to do it.