Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

Is it possible to stop all cronjobs for a particular cpanel user? The cronjobs should be resumable when required later.

There are several hundred cronjobs running under this user. Only this user's cronjobs should be paused/suspended.

share|improve this question

marked as duplicate by Jenny D, masegaloeh, Scott Pack, Ward, Andrew Schulman Apr 12 '15 at 11:45

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

See the options at:… – ewwhite Sep 16 '12 at 21:33
I have several hundred cronjobs, it takes some time to manually comment and uncomment the lines. /etc/init.d/crond stop is not suitable as that will stop the cronjobs of all users, I just need to stop cronjobs of a user. – Nyxynyx Sep 16 '12 at 21:48
up vote 2 down vote accepted

I think there is a cleaner way :

According to centos documentation , you can use /etc/cron.allow and /etc/cron.deny to achieve this.

However, these file are os dependent (I assume you are using centos/redhat from the tags of your question).

Though, in newer versions this has stopped working.

share|improve this answer
That only controls access to the crontab, it does not stop the existing cronjobs from running. You have to rename the crontab file: – Perleone Nov 13 '13 at 9:53
Yes it does : If you add a user to /etc/cron.deny, no more cronjob will be started for this user. Have you tried the solution? What problem did you encounter? – user130370 Nov 13 '13 at 10:21
No problem, just wanted to clarify. With Ubuntu 12.04.3 LTS an entry in /etc/cron.deny only prevents the user from accessing her crontab, as stated in the man page. "You (user) are not allowed to use this program (crontab). See crontab(1) for more information." The cron daemon itself does not care about cron.deny. Does CentOS handle that differently, or is it a cpanel feature? – Perleone Nov 13 '13 at 11:29
You are right : Can't get it working anymore and redhat has changed for cronie. I flagged it as outdated. I wasn't aware about ubuntu using cron.deny and cron.allow – user130370 Nov 13 '13 at 13:49

Not the answer you're looking for? Browse other questions tagged or ask your own question.