#!/bin/bash

# File containing the list of jobs
JOBS_FILE="/usr/bin/jobs.txt"

# Check if jobs file exists
if [ ! -f "$JOBS_FILE" ]; then
    echo "Error: $JOBS_FILE not found."
    exit 1
fi

# Read each line from jobs.txt and execute the command
while IFS= read -r command; do
    if [ -n "$command" ]; then  # Skip empty lines
        echo "Executing: $command"
        eval "$command"
        echo "Command completed."
    fi
done < "$JOBS_FILE"

echo "All jobs completed."