Super User is a question and answer site for computer enthusiasts and power users. 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

Why don't cron jobs, that I have made in cPanel, show up when I use PuTTy and type crontab -l?

share|improve this question

migrated from Jan 28 '11 at 21:59

This question came from our site for professional and enthusiast programmers.

up vote 1 down vote accepted

Each user on a system has the potential to schedule cron jobs. In other words, there can be many separate sets of cron jobs.

Try ls /var/spool/cron to see a list of users with scheduled jobs.

If the job you scheduled was a script named foo, try grep -l foo /var/spool/cron/* to find out which user scheduled it.

The crontab command has a -u option to specifiy the user. You can use this to view the jobs created in cPanel.

You most likely need to be logged on as root or use sudo.

share|improve this answer

Supposing the user of whm or host is ashkany, try:

cd /var/spool/cron

See user --> my user is ashkany:

nano ashkany

Change something and save it.

Same: (run just in 1:23 min every night)

1 23 * * * /usr/local/bin/php/ -p /home/ashkany/public_html/cron.php

(run every 30 min)

*/30 * * * /usr/local/bin/php/ -p /home/ashkany/public_html/30.php
share|improve this answer

Have no idea why they are not visible there. Under putty just add them by:

crontab -e
share|improve this answer

The first thing I can think of would be to check the user for whom the cron was created for. You won't see the crontab if you aren't logged in as the same user the crontab was created for in cpanel.

I have never used cpanel, so I don't know if there's an option to create crons for different user or whatnot, so forgive me if I'm off base with this one.

Good luck!

share|improve this answer
I guess your right about it being a user issue. because if i add the jobs through cpanel they work but if i add the exact same line of code via putty it doesn't work. – Anonymous Jan 28 '11 at 20:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .