Cron usage

Moderator: leecollings

Post Reply
Number8
Posts: 374
Joined: Friday 23 May 2014 7:55
Target OS: Linux
Domoticz version: 2022.1
Location: Saint Pierre de Jards
Contact:

Cron usage

Post 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
Debian buster on NUC and three RPi with buster.
alfred_j_kwak
Posts: 110
Joined: Friday 20 September 2013 18:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2.3530
Location: Finland
Contact:

Re: Cron usage

Post by alfred_j_kwak »

Have you tried Google? "Cron once a minute" give me correct answer in first link.
Number8
Posts: 374
Joined: Friday 23 May 2014 7:55
Target OS: Linux
Domoticz version: 2022.1
Location: Saint Pierre de Jards
Contact:

Re: Cron usage

Post by Number8 »

I did Google before posting. I did try without success this entry as well

Code: Select all

* * * * * /home/domoticz/scripts/script.sh
Debian buster on NUC and three RPi with buster.
Number8
Posts: 374
Joined: Friday 23 May 2014 7:55
Target OS: Linux
Domoticz version: 2022.1
Location: Saint Pierre de Jards
Contact:

Re: Cron usage

Post by Number8 »

It did not work bercause the script did not have the execution property set
Debian buster on NUC and three RPi with buster.
alfred_j_kwak
Posts: 110
Joined: Friday 20 September 2013 18:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2.3530
Location: Finland
Contact:

Re: Cron usage

Post 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.
Number8
Posts: 374
Joined: Friday 23 May 2014 7:55
Target OS: Linux
Domoticz version: 2022.1
Location: Saint Pierre de Jards
Contact:

Re: Cron usage

Post by Number8 »

indeed, but before posting I had try the one that works. The issue the execution not set
Debian buster on NUC and three RPi with buster.
User avatar
Egregius
Posts: 2592
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: Cron usage

Post 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.
alfred_j_kwak
Posts: 110
Joined: Friday 20 September 2013 18:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2.3530
Location: Finland
Contact:

Re: Cron usage

Post 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.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest