Nedd Help On Crontab/Cron Please

Discussion in 'Installation/Configuration' started by pg001, Jun 27, 2008.

  1. pg001

    pg001 New Member

    Need Help On Crontab/Cron Please

    I can't seem to make my cronjob work, I am new to cron.
    I followed Debian Etch Perfect Server Setup with ISPConfig running.
    My crontab looks like this:

    30 00 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/logs.php &> /dev/null
    59 23 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/ftp_logs.php &> /dev/null
    59 23 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/mail_logs.php &> /dev/null
    59 23 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/cleanup.php &> /dev/null
    0 4 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/webalizer.php &> /dev/null
    0,30 * * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/check_services.php &> /dev/null
    15 3,15 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/quota_msg.php &> /dev/null
    40 00 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/traffic.php &> /dev/null
    05 02 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/backup.php &> /dev/null
    0 4 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/awstats.php &> /dev/null
    5 * * * * /usr/bin/php -f /var/www/web1/web/sendstudio/admin/cron/cron.php &> /dev/null
    I can't seem to make the last cronjob run, is it in the right format and path?
    5 * * * * /usr/bin/php -f /var/www/web1/web/sendstudio/admin/cron/cron.php &> /dev/null
    is /usr/bin/php the correct path to php? files at /var/www/web1/web/ are owned by web1_user.

    Please help.
    Thanks in advance.
    Last edited: Jun 28, 2008
  2. chipsafts

    chipsafts New Member

    from the command line, type in:
       whereis php
  3. pg001

    pg001 New Member

    /usr/bin/php is appearing when I type whereis php.

    I did the crontab -e as root, should it be done as the user of the file, web1_user instead? In other words I was logged in as root when I did the crontab -e, should I be logged in as web1_user instead?
  4. falko

    falko Super Moderator ISPConfig Developer

    What's in /var/www/web1/web/sendstudio/admin/cron/cron.php?
    What happens when you run
    /usr/bin/php -f /var/www/web1/web/sendstudio/admin/cron/cron.php
  5. pg001

    pg001 New Member

    run manually, meaning on the command prompt? When I logged in as web1_user not root and try to type

    i get this:

    /var/www/web1/web/sendstudio/admin/cron/cron.php is a php file which handles the scheduled mailing and autoresponders for my maling list manager (sendstudio).

  6. falko

    falko Super Moderator ISPConfig Developer

    The command you must run on the shell is
    /usr/bin/php -f /var/www/web1/web/sendstudio/admin/cron/cron.php
    5 * * * * /usr/bin/php -f /var/www/web1/web/sendstudio/admin/cron/cron.php &> /dev/null
  7. pg001

    pg001 New Member

    I get the same message:

  8. chipsafts

    chipsafts New Member

    hmm, post the full contents of the cron.php that is not running. falko, would `ps ax` show a stuck cron job, if that is what json is?
  9. pg001

    pg001 New Member

    thanks for all the help chipsafts and falko, things are running properly now, I guess I just mistyped something on the crontab, the script/software is running properly now and sending emails.
  10. falko

    falko Super Moderator ISPConfig Developer

    Open /etc/php5/apache2/php.ini and comment out or delete the line
    extension =
    Restart Apache afterwards.
  11. torusturtle

    torusturtle ISPConfig Developer ISPConfig Developer

    In my case I had to comment it out in the file /etc/php5/cli/php.ini

Share This Page