0

I have written a python script that will change my desktop wallpaper on my Lxde crouton shell, that seems to run just fine:

import os
from time import localtime
from pathlib import Path

wp = Path("/home/lucasmccallums/Desktop/projects/wallpaper_transitions")


hour = localtime().tm_hour

if (hour < 6) or (hour >= 21):
    os.system("pcmanfm --set-wallpaper=" + str(wp / "night.png"))

elif (hour >= 14):
    os.system("pcmanfm --set-wallpaper=" + str(wp / "afternoon.png"))

else:
    os.system("pcmanfm --set-wallpaper=" + str(wp / "morning.png"))

However when I try to run it through crontab as */1 * * * * /usr/bin/python3 /home/lucasmccallums/Desktop/projects/wallpaper_transitions/desktopdemo.py It seemingly installs fine crontab: installing new crontab However it still doesn't seem to work. I try to use the command /etc/init.d/cron start But am faced with
cron: can't open or create /var/run/crond.pid: Permission denied

I shall keep updating as I try to figure this out but any help will be much appreciated, thank you!

1 Answers1

0

On Crontab

0 6,14,21 * * */usr/bin/somedirectory/py.....
Dratius
  • 49
  • 4
  • 1
    While this code may answer the question, providing additional context regarding why and/or how this code answers the question improves its long-term value. – β.εηοιτ.βε Jun 14 '20 at 20:50