0
votes

I have created cron jobs by using "crontab -e" command. And they are working good . I tried crontab -r command which removes all cron job from server. These are my crons.

=> * 2 * * * root /usr/bin/php /home/user/test.php

=> * 3 * * * root /usr/bin/php /home/user/test2.php

=> * 4 * * * root /usr/bin/php /home/user/test3.php

How can I remove specific ones. Could you please help me for the solution ?

1

1 Answers

1
votes

You have 2 ways to perform this. 1: By using crontab -e 2: Or if you have super user access then "/var/spool/cron/" path you will get the cron job files for each user like below. cd /var/spool/cron/ ll total 4 -rw-------. 1 root root 0 Jan 13 2018 root -rw-------. 1 root root 131 Jun 19 18:16 sam

A form that user, you can use the sed command to delete the single job.