Jeroen Swets
Jeroen Swets

Reputation: 225

How to remove this cronjob in ubuntu

I'm running a webserver with PLESK and installed an extension 'kernel care' which I later on deleted. However, it installed a cronjob which sends me a mail every 4 hours:

Cron <root@server> /usr/bin/kcarectl --auto-update
Unknown Kernel (Ubuntu 3.13.0-042stab123.9)

I ssh into the server and run crontab -l as root but don't see the specific cronjob. However, in /etc/cron.d there is a file kcare-cron and if I cat this file it shows

16 */4  * * * root /usr/bin/kcarectl --auto-update

So thats the one I want to delete. Can I just delete the file kcare-cron?

Upvotes: 4

Views: 29314

Answers (5)

spudnik267
spudnik267

Reputation: 3

If you check file

/etc/cron.allow

and see if accounts other than root exist, if there is then su to those accounts and try all the suggested actions above.

Upvotes: 0

Elvis Plesky
Elvis Plesky

Reputation: 3300

Notifications are sent by cron job configured in one of the following files /etc/cron.d/kcare-cron.rpmsave or /etc/cron.d/kcare-cron. Remove these files:

rm -f /etc/cron.d/kcare-cron.rpmsave
rm -f /etc/cron.d/kcare-cron

Upvotes: 0

Rashid Ahmad Khan
Rashid Ahmad Khan

Reputation: 328

1- Open terminal & type

sudo crontab -e

Now either remove cron command or marked '#' at start of command. Now save file (ctrl + O, & ctrl +X) & exit.

2- Do second option

sudo crontab -r

Note: This will remove all cron job.

Upvotes: 10

Ghanshyam Dekavadiya
Ghanshyam Dekavadiya

Reputation: 153

  1. Go to Command Line and type "crontab -e".
  2. it will open the cron file to add the cronjobs.
  3. Now, scroll at the bottom or last line to this file and add the line or cron job to this file using cron job format.
  4. If you want to delete or remove the cron then simple add the "#" at the start of a line or remove that whole line.
  5. Save the file and cron is added cron job list

Upvotes: 0

Ganesh Ghalame
Ganesh Ghalame

Reputation: 7003

Type below command in terminal:

contab -e

then comment the line with # at the start of line as below:

#16 */4  * * * root /usr/bin/kcarectl --auto-update

Or if you want to delete you can delete the line.

On saving the file it will automatically use changes in crontab.

Upvotes: 0

Related Questions