Is there a way to run a script before/after a Job

mike2012

Renowned Member
Apr 29, 2015
42
1
73
Is there a way to run a script before/after a job like Prune / Garbage collect / sync / ...
 
just for completeness:
added a comment to your request as this would also be useful for me (waking the PBS machine before job)
Best regards,
Otto
 
HI,I had a similar need, here's how I did it:
- defined a job (in my case a verify job) not scheduled directly by PBS (disabled)
- created a shell script:

#!/bin/bash
# 1. mount share where remote datastore resides
mount /mnt/pbsaws
# 2. run verify job by his ID (taken from PBS console)
proxmox-backup-manager verify-job run v-xxxxxxxx-yyyy
#3. unmount share
umount /mnt/pbsaws

the script is executed via crontab every week on Sunday
It should be easy for you to adapt the script to suit your needs.

I hope I was helpful,
Greetings