CRON to run bash script

Post Reply
nf8c
Posts: 1
Joined: Fri Jan 13, 2023 1:34 am

CRON to run bash script

Post 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.
KN2TOD
Posts: 262
Joined: Sun Nov 11, 2018 6:36 pm

Re: CRON to run bash script

Post 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.
Post Reply