I use my RPi to periodically take pictures, both snapshots and of detected motion events. Is there any way to stop motion from taking pictures during the night? For example I imagine this could be done through crontab, but I haven't been able to find any way to control motion through the command line. Any suggestions on how I could control it through crontab, or alternatively other solutions?

  • possible duplicate of control motion via cron – Werner Kvalem Vesterås Oct 6 '14 at 6:23
  • I think you should give more information like the software you use to take snapshots (maybe motion but I'm not sure), if you run it at startup (and if so, how), what you have tried, etc. – Morgan Courbet Oct 7 '14 at 13:29

Motion supports remote commands via http, documented at RemoteControlHttp. You can use wget, curl, or lwp-request in crontab to stop motion at a predetermined time. Assuming default options in motion.conf, this example will stop motion at 8pm each day:

0 20 * * * curl -s -o /dev/null http://localhost:8080/0/action/quit
| improve this answer | |

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.