I am trying to port the code over to a new server hosted somewhere else, and I want to know what cron jobs are running on the old box.

Where can I find these?

crontab -l

0 0,6 * * * php-cli /home/mycompany/public_html/index.php cron get_review_data
0 0 * * * php-cli /home/mycompany/public_html/index.php cron save_stats
0 0,6 * * * php-cli /home/mycompany/public_html/index.php cron check_for_new_reviews
0 0,6 * * * php-cli /home/mycompany/public_html/index.php cron refresh_infusionsoft_token
*/3 * * * * php-cli /home/mycompany/public_html/index.php cron infusionsoft
*/5 * * * * php-cli /home/mycompany/public_html/index.php cron sequence
0 0,6 * * * /usr/local/bin/python3.4 /home/scraper/scraper.py

I've checked /etc/cron.* with no luck.

Where can I go?


The functions called (get_review_data, save_stats, check_for_new_reviews, etc.) should be listed within the php code and python code, /home/mycompany/public_html/index.php and /home/scraper/scraper.py

Examining those files should show what's actually being executed.

| improve this answer | |
  • I think he wants to know where the crontab is stored, not the scripts that are being run by it. – Barmar May 23 '16 at 23:49
  • I suppose that's possible, in which case it would help to know what OS he's running on... How 'bout it Jacob, is that right and if so what OS? – Liczyrzepa May 24 '16 at 2:54

You seem to look at your crontab with crontab -l. The corresponding command for editing crontabs is crontab -e.

This command will edit crontabs that are generally in the directory /var/spool/cron/crontabs/.

In this directory you will find files named after usernames owning the crontab.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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