This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script will be run by crontab every one mint | |
# */1 * * * * /root/scripts/turn-on-pve1-cron/turn-on-pve1-cron.sh 2>&1 | |
# This script will power on a remote server via Wake On Lan, but only 5 mints before the backup job is about to be executed. | |
# This will be reading the job file /etc/pve/jobs.cfg every time: | |
# On a CRON JOB every 1 mint | |
# check if the server is not Power On by checking the file, then | |
# SSH into the pve_node |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Data; | |
using System.Globalization; | |
using System.IO; | |
using System.Linq; | |
using System.Reflection; | |
using System.Runtime.InteropServices; | |
using System.Text; |