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 Dec 14 '19 at 23:21
  • That is not a command! That is an entry in crontab. See linux.die.net/man/5/crontab – SiKing Dec 16 '19 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 Jan 24 '20 at 11:05
  • Thank you for reminding me about this question – ksiadz510 Jan 24 '20 at 17:19
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, privacy policy and cookie policy

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