Please help me with my cron job. Immense details inside.
Posted: 2010/01/23 02:42:00
I apologize profusely for the umpteenth time this question has been asked, but I have been to the end of the internet and back and tried every solution and I just have not had any luck.
Please forgive me, and see if you can help me out. I will run any command I need to and post back the results.
I don't care what it takes, but I need to stop doing things at the end of every day that should be automated tasks.
PHP is running as CLI-enabled, crond is running, everything is doing what it should, but I just cannot get this script to be run by crontab.
My crontab, where $HOME is: /home/user/
[code]
MAILTO=me@company.com
30 18 * * * /usr/bin/php -f $HOME/retireevents.php
[/code]
Screenshot of the file in its proper path:
[img]http://www.kinsbane.net/temp/cron-showpathtofile.jpg[/img]
Screenshot of the file permissions:
[img]http://www.kinsbane.net/temp/show-file-perms.jpg[/img]
Screenshot of /usr/bin/php:
[img]http://www.kinsbane.net/temp/usr-bin-php.jpg[/img]
when I type "env" into the terminal, here's what it outputs (information edited a little bit to only deal with entries that weren't pertinent to possible solutions I found on the internet)
[code]
SHELL=/bin/bash
USER=user
MAIL=/var/spool/mail/user
PATH=/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/user/bin
PWD=/home/user
HOME=/home/user
LOGNAME=user
LESSOPEN=|/usr/bin/lesspipe.sh %s
G_BROKEN_FILENAMES=1
_=/bin/env
[/code]
I *know* all of this information is 100% correct.
Yet, I am getting emails from the Cron Daemon that say this:
[quote]
From: root@thunder
Subject: Cron /usr/bin/php -f $HOME/retireevents.php
Date: January 22, 2010 6:33:01 PM PST
To: me@company.com
------------------------------------------------------------------------------------------
Could not open input file: /home/user/retireevents.php
[/quote]
Now, the path listed in the email is the EXACT SAME path listed in the cron job itself, and you can also verify that by the screenshot I posted above.
But yet, I still am getting emails telling me that Cron "Could not open input file".
I just need help to fix this so I can take a huge weight off my shoulders. I am spending upwards of an hour at the end of every day doing other people's repetitive tasks that should be handled automagically by the server itself.
I really, REALLY need your help.
Thank you so much in advance for any assistance you can offer.
Please forgive me, and see if you can help me out. I will run any command I need to and post back the results.
I don't care what it takes, but I need to stop doing things at the end of every day that should be automated tasks.
PHP is running as CLI-enabled, crond is running, everything is doing what it should, but I just cannot get this script to be run by crontab.
My crontab, where $HOME is: /home/user/
[code]
MAILTO=me@company.com
30 18 * * * /usr/bin/php -f $HOME/retireevents.php
[/code]
Screenshot of the file in its proper path:
[img]http://www.kinsbane.net/temp/cron-showpathtofile.jpg[/img]
Screenshot of the file permissions:
[img]http://www.kinsbane.net/temp/show-file-perms.jpg[/img]
Screenshot of /usr/bin/php:
[img]http://www.kinsbane.net/temp/usr-bin-php.jpg[/img]
when I type "env" into the terminal, here's what it outputs (information edited a little bit to only deal with entries that weren't pertinent to possible solutions I found on the internet)
[code]
SHELL=/bin/bash
USER=user
MAIL=/var/spool/mail/user
PATH=/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/user/bin
PWD=/home/user
HOME=/home/user
LOGNAME=user
LESSOPEN=|/usr/bin/lesspipe.sh %s
G_BROKEN_FILENAMES=1
_=/bin/env
[/code]
I *know* all of this information is 100% correct.
Yet, I am getting emails from the Cron Daemon that say this:
[quote]
From: root@thunder
Subject: Cron /usr/bin/php -f $HOME/retireevents.php
Date: January 22, 2010 6:33:01 PM PST
To: me@company.com
------------------------------------------------------------------------------------------
Could not open input file: /home/user/retireevents.php
[/quote]
Now, the path listed in the email is the EXACT SAME path listed in the cron job itself, and you can also verify that by the screenshot I posted above.
But yet, I still am getting emails telling me that Cron "Could not open input file".
I just need help to fix this so I can take a huge weight off my shoulders. I am spending upwards of an hour at the end of every day doing other people's repetitive tasks that should be handled automagically by the server itself.
I really, REALLY need your help.
Thank you so much in advance for any assistance you can offer.