cron stop hdd spining off

Hello! I have a HDD that spining off every 10min. On Debian i use this below command to touch hdd every 5min so that it stop spining off.

*/5 * * * * /bin/touch /run/media/user/lacie &>/dev/null

it works fine at Debian and gets output from [FONT=monospace][FONT=monospace][FONT=monospace]crontab -l[/FONT][/FONT]

I tried on Tumbleweed but,

[FONT=monospace]crontab -l 
no crontab for root

[/FONT][/FONT]Which equivalent commands from that of Debian can i use on opensuse [FONT=monospace]Tumbleweed[/FONT]?
[FONT=monospace]
[/FONT]Thank you for every answer.

Isn’t that as expected? You never created a crontab entry before, thus it is not only empty, but does not even exist.

When you want to alter your crontab, if it already exists or not, use

crontab -e

Thanks hcvv,

crontab -e did the trick, after created it successfully i got answer from crontab -l now.

**opensuse:~ #** crontab -l
*/5 * * * * /bin/touch /run/media/user/lacie &>/dev/null 
**opensuse:~ #**

Isn’t that logical? After you entered an entry it can be listed. Very simple :wink:

Did you ever think about consulting

man crontab

Yeah, I had created it differently in debian and i was confused.

I did very briefly “man 5 crontab” before started reading forums and google, where i became even more confused. I should have been more careful on the manpage.

I have no idea how Debian deviates. But managing ones crontab is done using the crontab command since tens of years. Implementations may differ, thus (as in this case it is a command) man 1 crontab on the system where it should run is the best to get up-to-date information local to your Unix/Linux taste.

On Debian i run the command from terminal and immediately accepted. I watched it actively at /var/spool/cron/crontabs. While here in Opensuse destination is the same, only changes folder name /var/spool/cron/tabs
I’m really new to both cron and openSUSE, I have to learn by making mistakes :slight_smile:

crontab -e after adding command it’s doing fine.

Thanks for your help.