cron problems

jaja55

New Member
Jun 15, 2023
28
1
3
Hi,
my UPS disconnects after a view hours. I found a solution by executing the following script:
Code:
upsdrvctl stop
wait 10
upsdrvctl start

now I try to use crontb to start it automaticly.
I use:
Code:
0 8,20 * * * root /scripts/restart.usv.sh daily

but it doesent work.
what is wrong ?
Thx for help
 
Maybe you want to use sleep instead of wait? Maybe your script file is not executable or it does not start with #!/bin/sh?
Why not use (in cron): 0 8,20 * * * upsdrvctl stop; sleep 10s; upsdrvctl start? Maybe you need to use the full path to upsdrvctl (use which upsdrvctl to find it).
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!