Skip to content

Do cron jobs need to run as root?

edited June 2013 in Questions

When setting up the cron jobs, is it necessary to run them as root (so use sudo crontab -e instead of just crontab -e to set them up?).

I'm running a LAMP stack on Amazon EC2.

Comments

  • Hi @stevegoldenberg,

    Yes you need to setup your cron jobs as root, sudo crontab -e on Amazon EC2 LAMP stack.

    Thanks.

    Best regards,
    Ben

  • @Ben, thank you. I'm stuck though, I installed them as root (sudo crontab -e) and they seem to be running (according to syslog at least https://www.dropbox.com/s/fa88cgbbgveg6om/Screenshot_6_21_13_10_57_AM.png) but the dialogs haven't cleared from my sendy installation yet.

    Any suggestions on what to look at?

  • BenBen
    edited June 2013

    Hi @stevegoldenberg,

    Try using the full path to php:

    */5 * * * * /opt/bitnami/php/bin/php /opt/bitnami/apache2/htdocs/sendy/scheduled.php > /dev/null 2>&1

    */1 * * * * /opt/bitnami/php/bin/php /opt/bitnami/apache2/htdocs/sendy/autoresponders.php > /dev/null 2>&1

    Hope this helps.

    Best regards,
    Ben

  • Boom. Thanks, works great now.

    This is one hell of a piece of software.

  • This is one hell of a piece of software.

    Thank you!

This discussion has been closed.