1

I want to change pin state at certain time with Crontab.
I tried to use this command: 7 0 * * * /usr/bin/gpio -g write 0 0 but it returns me this error: bash: 7: command not found
I also tried: 7 0 * * * /home/pi/test.sh
but it gives me: bash: 7: command not found
test.sh files has only on line with this command: gpio write 0 0
I used sudo chmod +x /home/pi/test.sh before

EDIT 1:
crontab -l return no crontab for pi

4
  • 3
    You have a malformed crontab. Please edit your questions and include the full result of crontab -l.
    – joan
    Commented Dec 14, 2019 at 23:21
  • That is not a command! That is an entry in crontab. See linux.die.net/man/5/crontab
    – SiKing
    Commented Dec 16, 2019 at 23:06
  • You have asked a similar question at Crontab not executing php scripts. Do you also found a solution for this question here? If so please make an answer and accept it after two days.
    – Ingo
    Commented Jan 24, 2020 at 11:05
  • Thank you for reminding me about this question
    – ksiadz510
    Commented Jan 24, 2020 at 17:19

1 Answer 1

1

I simply used 7 0 * * * gpio write 0 0 as my crontab "command"

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.