I am new to python and I am trying to create a cronjob through a python script, but I keep getting the error. Any help would be greatly appreciated to show me what I am doing wrong?
thanks
python script
from crontab import CronTab cron = CronTab(user=True) job = cron.new(command='python /Users/<useraccount>/Desktop/my_script.py') job.minute.on(2) job.hour.on(12) cron.write()
Error:
Traceback (most recent call last): File "/Users/<useraccount>/Desktop/01-python-crontab.py", line 3, in <module> cron = CronTab(user=True) TypeError: __init__() got an unexpected keyword argument 'user'
source share