PhyrePanel/bin/cron-job-delete.sh

11 lines
250 B
Bash
Raw Normal View History

2023-11-27 18:59:11 +00:00
#!/bin/bash
2023-11-27 14:20:18 +00:00
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!"