1

I want to close a relay contact automatically every day at 2 AM local time for 2 seconds, and then open. I can do this manually right now, but want to know where I should put the commands to do this automatically. Please advise. Thanks!

3

Consider adding a cron job. Do:

crontab -e

and you will probably want a line such as:

0   2   *   *   *     /path/to/your/script/that/holds/relay/for/2/seconds

That will trigger the script at 0 minutes after hour 2, every day of every month and every weekday.

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.