I'm using a python script to update crontab for a particular user 'pi' using code below and keep getting this error. Using this same exact script on a ubuntu works without any error. Anyone got any ideas why this might be?
CODE:
***my_cron = CronTab(user='pi')
for job in my_cron:
if job.comment == i:
job.minute.on(crminutes)
job.hour.on(crhour)
my_cron.write()***
ERROR:
***Traceback (most recent call last):
File "crontimings.py", line 455, in <module>
my_cron = CronTab(user="pi")
TypeError: __init__() got an unexpected keyword argument 'user'***
Script permission look like this:
-rwxr-xr-x 1 pi pi 16686 Apr 24 19:34 crontimings.py