I have created cron jobs for my site which is listed below and they are working fine. I print all cron job by using this PHP script:
$cronfiles=exec('crontab -l',$output);
echo "<pre>";
print_r($output);
Which outputs:
[0] => 0 0 * * * wget php -q http://www.example.com/report_send.php
[1] => 0 0 * * * wget php -q http://www.example.com/event_reminder.php
[2] => 0 0 * * * wget php -q http://www.example.com/user_reminder.php
[3] => * * * * * wget php -q http://www.example.com/cleardata.php
Now I want to delete or remove a single cron job from my server through command. For example I want to remove cron job "0 0 * * * wget php -q http://www.example.com/event_reminder.php
" from server.
I tried crontab -r
command which removes all cron job from my server but i want to remove specific cron job.
Can you please help me for solution?