Re: Crontab logs

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Nathan England
Date:  
To: Keith Smith
CC: 'Main PLUG discussion list'
Subject: Re: Crontab logs

Most people do not include the correct crunch bang in their code to make
the file work simply by making it executable. (chmod a+x /path/to/file)

If the file does not have the crunch bang (#!/usr/bin/php -q (for php))
then you can execute it by prefixing with php, and the file does not
need to be executable.

Sounds like you are getting along just fine.

On 2015-07-20 15:48, Keith Smith wrote:
> I have 4 other php scripts running without the wget or the php. The
> script is running. I looked at the owner and permissions on another
> php script that is working via cron and it was owned : user:apache and
> has permissions of -rwxr-xr-x . I changed both and now the script
> runs.
>
> I have always thought you need wget at the start of the cron string.
> However I did not add it to any of the user crontabs.
>
> The first line of my script is #!/usr/bin/php -q. Doesn't that cause
> the script to run via PHP?
>
> I'm still curious why the failed attempt by cron to run the script did
> not show up in the logs? /var/lib/cron
>
> Thank you for your help!!
>
>
>
>
>
> On 2015-07-20 15:36, Nathan England wrote:
>> Just to be clear, is this a command line php script?
>>
>> If so, you need to execute it with php first.
>>
>> 36 * * * * php /path/to/script/script.php
>>
>>
>> If this is a php web page, you need wget or curl to get it
>> 36 * * * * wget http://yourdomain.com/script.php
>>
>>
>>
>> On 2015-07-20 15:28, Keith Smith wrote:
>>> Hi,
>>>
>>> I'm on CentOS 6.6 and created a user crontab ( crontabe -e ). I
>>> added
>>> the line to run a PHP script at 36 after the hour.
>>>
>>> 36 * * * * /path/to/script/script.php
>>>
>>> Had a path wrong so it was failing.
>>>
>>> Was looking in /var/log/cron and it did not show the error.
>>>
>>> What am I missing?
>>>
>>> Thanks!!
>>> Keith
>>>
>>>
>>> ---------------------------------------------------
>>> PLUG-discuss mailing list -
>>> To subscribe, unsubscribe, or to change your mail settings:
>>> http://lists.phxlinux.org/mailman/listinfo/plug-discuss

---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change your mail settings:
http://lists.phxlinux.org/mailman/listinfo/plug-discuss