LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-22-2017, 01:22 PM   #1
karll
LQ Newbie
 
Registered: Sep 2009
Location: United Kingdom
Distribution: RHEL, Fedora, FreeBSD
Posts: 21

Rep: Reputation: 0
Unhappy Disabled cron job is still running


I have a problem with a cron job that is somehow still running even though I've commented out the line inside the cron file (in /etc/cron.d/) that defines the job. I commented out that line weeks ago, and I have since restarted the server:

Code:
# more /etc/cron.d/certbot 
[snip]
# 0 */12 * * * root test -x /usr/bin/certbot -a \! -d /run/systemd/system && perl -e 'sleep int(rand(3600))' && certbot -q renew
I don't see anything interesting in /var/spool/cron/ :

Code:
# tree /var/spool/cron/
/var/spool/cron/
├── atjobs
├── atspool
└── crontabs
3 directories, 0 files
Yet, I can see in the syslog file it's still running:

Code:
Nov 22 12:54:56 thule certbot[15180]: /usr/lib/python2.7/dist-packages/OpenSSL/rand.py:58: UserWarning: implicit cast from 'char *' to a different pointer type: will be forbidden in the future (check that the types are as you expect; use an explicit ffi.cast() if they are correct)
Nov 22 12:54:56 thule certbot[15180]: result_code = _lib.RAND_bytes(result_buffer, num_bytes)
Nov 22 12:55:01 thule CRON[15271]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Nov 22 12:55:25 thule systemd[1]: Started Certbot.
What is going on? How can I stop this job from running again?

(The reason I want to disable the job is because my web server somehow dies every time this job tries to restart it.)

Edited to add:

Code:
# crontab -l
no crontab for root
I've also looked in /etc/cron.hourly/, /etc/cron.daily/, /etc/cron.weekly/ and /etc/cron.monthly/, but there's no reference to the problematic cron job.

Last edited by karll; 11-22-2017 at 02:39 PM. Reason: more info
 
Old 11-22-2017, 05:02 PM   #2
karll
LQ Newbie
 
Registered: Sep 2009
Location: United Kingdom
Distribution: RHEL, Fedora, FreeBSD
Posts: 21

Original Poster
Rep: Reputation: 0
A-ha! In addition to the cron job, there is apparently also a systemd job!

So I should do something like this?

Code:
systemctl disable certbot.service
systemctl disable certbot.timer

Last edited by karll; 11-22-2017 at 05:18 PM. Reason: more info
 
  


Reply

Tags
cronjob



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cron Job Not Running - Looks Like Cron Tried Noble User Linux - Newbie 7 10-26-2014 10:26 AM
Running a Cron Job landysaccount Linux - Newbie 6 02-04-2009 05:29 PM
cron job not running vincebs Linux - Software 34 10-30-2004 01:27 PM
Cron job not running? james_cwy Linux - Newbie 6 12-14-2003 08:24 PM
Cron Job Not Running pzorn Linux - General 4 10-02-2003 01:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:20 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration