I have a RPi 3 running Raspbian Stretch.
My plan is to write a Python program to control a 4-relay module to switch lights on and off at predetermined times.
I’ve used tkinter to create a UI to select the on/off times which works fine.
I had hoped to use Python-crontab to create/edit a crontab within python, based on my UI selections which would call another python script to switch the lights on/off.
I installed python-crontab using:
pip install python-crontab Which seemed to have been successful.
My Python script starts:
#!/usr/bin/python3 from crontab import CronTab Which generates the ‘ImportError: No module named 'crontab'’
python-crontab seems just perfect for what I’m trying to do. Can anyone help please?
pip install python3-crontab.