Re: Corn job anomaly

Karl DeSaulniers <[email protected]> Tue, 20 Sep 2016 12:54:38 -0500
Newsgroups gmane.comp.php.database
Message-ID <[email protected]>
--Apple-Mail-A0360E9A-D4CE-4024-8480-0133C91445A6
Content-Type: text/plain;
	charset=us-ascii
Content-Transfer-Encoding: quoted-printable

On Sep 20, 2016, at 7:21 AM, Richard <[email protected]=
t> wrote:
>=20
>=20
>=20
>> Date: Tuesday, September 20, 2016 03:26:39 -0500
>> From: Karl DeSaulniers <[email protected]>
>>=20
>>> On Sep 20, 2016, at 3:22 AM, Lester Caine <[email protected]>
>>> wrote:
>>>=20
>>>> On 20/09/16 09:14, Karl DeSaulniers wrote:
>>>> Pardon my ignorance, but what do you mean full path?
>>> Full path to php application.
>>> Cron jobs run as 'root' and so need and user account settings added
>>> manually if they do not match the 'root' environment.
>>>=20
>>=20
>> OH, ok, I did read something about root earlier.
>> I think it was something like:
>>=20
>> root /usr/bin/php5 /home/(directory name removed)/auto_reminder.php
>>=20
>> But not positive. I will have to research that more.
>> Thank you.
>>=20
>>=20
>=20
> Whether cron jobs run as root or a standard user depends on how they
> are set up. If set up under a user -- which is the better approach
> for general use -- they will run as that user. Really only
> system-type cron jobs (that require root access) should be set up to
> run as root.
>=20
> If you use the command:=20
>=20
>   crontab -e
>=20
> from a user account, then the crontab is set up as that user. The
> first 5 fields/values are time/date related, followed by the command
> to be invoked. See: man -s5 crontab  for more details.
>=20
> In that case, the user that mysql sees is the user that is running
> the job. So, if your mysql authentication is set to accept
> connections/give access to say the user your web server is running as
> (which is how php will show by default), then you will either need to
> pass those credentials in your cron job php script or, give the user
> that's running the cron job access.
>=20

Again, thank you for the response Richard.

Would you possibly have a link to how to set that up? I mean the actual comm=
ands. My trouble is I don't know what commands and how to write them. Like i=
ncluding a user, forcing the PHP.ini and executing the script. All in one li=
ne. That is what I am trying to accomplish and not sure how. Need to read up=
 on the proper way to do this.=20

TIA,

Best,
Karl=

--Apple-Mail-A0360E9A-D4CE-4024-8480-0133C91445A6--