PhyrePanel-mirror/bin/cron-job-delete.sh
2024-04-22 14:14:05 +03:00

10 lines
250 B
Bash

#!/bin/bash
username=$1
schedule=$2
command=$3
# Get the user's crontab, filter out the specific command and schedule, and install the updated crontab
crontab -u $username -l | grep -v -F "$schedule $command" | crontab -u $username -
echo "done!"