Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

How can I view all cron jobs scheduled on my Linux Ubuntu VPS? When I use crontab -l I do get a list of cronjobs but I cannot see the ones that are scheduled by WordPress, how can I also see the ones that each WP installation is scheduling?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

Wordpress cron jobs are often not system cron jobs, they are just scheduled within the wordpress configuration and triggered when a visitor arrives at the site near the time when the cron job is set to be exectuted. In order to work out when they occur, you would need to check the table within wordpress that they are stored in.

If you want to check system cronjobs, then as root, you can look in the /var/spool/cron/crontabs directory, which contains a crontab file for each user that has cron jobs configured, named after their user account.

share|improve this answer
    
Thanks the file I found has the same contents as when using crontab -l command. I was afraid that my htaccess was being rewritten via a cronjob (site was hacked), but it seems it is not so as there are no such crons here, and neither in the WordPress install, which I've checked using a plugin to view WP crons. –  drtanz Apr 18 '12 at 12:09
    
If the site was compromised, then any of the wordpress files could potentially be overwriting the .htaccess files. It is very likely that several of the files have backdoors. Your best approach is to take a backup of the datebase, delete all the files, re-install and restore. –  Paul Apr 18 '12 at 12:59
    
Indeed, that's what I've done, although there is still a chance that some of the content related files were infected. I cannot just delete those of course. –  drtanz Apr 18 '12 at 13:02
add comment

Your Answer

 
discard

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.