Page 1 of 1

CRON to run bash script

Posted: Sun Jan 15, 2023 6:38 am
by nf8c
I'm trying to run a bash script every minute to send data to a webhook. The shell script is working just fine in shell. I think I must be messing something up in cron.

I have tried many variations. Anyone have an idea?
* * * * * root /usr/local/bin/webhook.sh


EDIT: Although I would like to get this figured out for now I'm using the systems built in CRON. The Pi-star is integrating well with Home Assistant.

Re: CRON to run bash script

Posted: Wed Jan 18, 2023 2:07 pm
by KN2TOD
When you run your script manually, are you in RW mode? Have you run your script from root? Have you looked at the syslog's and auth log's to see if perhaps any errors are thrown?

One observation: if you're running this script every minute, you may be butting heads with other system and Pi-Star functions that have files locked or are in the process of deleting (cleaning, compressing) - this may complicate the functioning of your script.