Cluster wide cron?

gbr

Well-Known Member
May 13, 2012
125
2
58
Hi,

I'd like to run a cron entry on all nodes in my cluster. Is there a cron file that gets replicated across all nodes in the cluster like vzdump.cron?

Gerald


edit: I might as well tell you what I'm doing. I generate offsite backups every weekend. The VM's get dumped to an NFS mount. So, on Friday, the NFS servers gets a USB drive hooked up at an NFS export point. Proxmox already has the NFS point mounted, so doesn't see the USB drive. If I umount the NFS mount on Proxmox, it gets remounted automagically, and Proxmox now sees the USB drive.

On Monday, the USB drive is unmounted on the NFS server, so I Proxmox needs to umount it as well.

Right now, my crontab contains:

# unmount the offsite disk, forcing a remount with the actual mounted one on backuppc.norscan.com
45 12 * * 6 /bin/umount /mnt/pve/offsite
50 11 * * 1 /bin/umount /mnt/pve/offsite

But I need to maintain this on all nodes in the cluster. It would be easier if I only had to do it once.
 
Last edited:
I'd like to run a cron entry on all nodes in my cluster. Is there a cron file that gets replicated across all nodes in the cluster like vzdump.cron?

Simply create the cron file on /etc/pve/ (all files there are replicated to all nodes). Then create a symlink from /ect/cron.d/ to that file (that is what we do for vzdump.cron).
 
Hi Dietmar,

I'll do that, thanks. It would be a great (and simple?) addition to the GUI to have an editable crontab for all hosts in a cluster.

Gerald
 

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!