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

I can run cron jobs manually like this

root@myhosting [~]# sync ; echo 0 > /proc/sys/vm/drop_caches

I can add it in to cPanel like this. This doesnt work because I need root access.

 * */4 * * * sync; echo 0 > /proc/sys/vm/drop_caches

So that leaves me to add the job using putty logged in as root. The above code doesn't work in putty. I get command not found

share|improve this question
up vote 3 down vote accepted

Run crontab -e. That will put you into an editor where you can add the cron line.

If you end up in an editor you don't know how to use, you can change it temporarily with

EDITOR=nano crontab -e

share|improve this answer

That is because this is not command line syntax. You'll need to get into the crontab editor in order to add your requested line. The most common way to do this is with the following line:

crontab -e

This will open your existing crontab. Add your proper crontab line to it, and then write/save.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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