#!/bin/bash # Script to check for scheduled cron jobs for /home/litespeed/mb-backups/backup_all.sh # Define the script path to check in cron jobs SCRIPT_PATH="/home/litespeed/mb-backups/backup_all.sh" # Use crontab -l to list all cron jobs, then grep to check for the specific script path CRON_JOB=$(crontab -l | grep -F "$SCRIPT_PATH") if [ -z "$CRON_JOB" ]; then echo "Automated Backups is not enabled." else echo "$CRON_JOB" | awk '{print "Schedule: " $1, $2, $3, $4, $5}' # Note: This script stops here, providing the schedule. Computing the next run time in a human-readable format is not straightforward in bash without external tools. fi