Page 1 of 1

Cron usage

Posted: Saturday 13 February 2016 16:13
by Number8
Hello,
I'm not very familiar with Cron. I set it up with the following instruction, expecting to have the script run every minutes. But it does not work.

Code: Select all

*/1 * * * * /home/domoticz/scripts/script.sh
The script works fine when launched at the command line level
Owner of the script is pi.

Thank you

Re: Cron usage

Posted: Saturday 13 February 2016 16:22
by alfred_j_kwak
Have you tried Google? "Cron once a minute" give me correct answer in first link.

Re: Cron usage

Posted: Saturday 13 February 2016 16:48
by Number8
I did Google before posting. I did try without success this entry as well

Code: Select all

* * * * * /home/domoticz/scripts/script.sh

Re: Cron usage

Posted: Saturday 13 February 2016 16:57
by Number8
It did not work bercause the script did not have the execution property set

Re: Cron usage

Posted: Saturday 13 February 2016 17:42
by alfred_j_kwak
But cron in your first post was also incorrect?
Just want to make sure that when someone else is searching help he/she will get correct information.

Re: Cron usage

Posted: Saturday 13 February 2016 17:44
by Number8
indeed, but before posting I had try the one that works. The issue the execution not set

Re: Cron usage

Posted: Saturday 13 February 2016 23:32
by Egregius
In my opinion */1 is the same as *
Altough there's no purpose of specifying */1 to run every minute as * is the same. */2 on the other hand runs every 2 minutes.

Re: Cron usage

Posted: Sunday 14 February 2016 7:10
by alfred_j_kwak
Egregius - you are right in both of your arguments. I have to admit that I have never even tried to use */1 cause * does the trick.