PhyrePanel/bin/cron-job-delete.sh
Bozhidar Slaveykov 92428a8c33 update
2023-11-27 20:59:11 +02: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!"