Discussion:
Cron Entries
David Johnson
2006-03-20 17:56:46 UTC
Permalink
One question is, I have a web application that needs to perform tasks as the
"www-data" user, rather than root. This is of course common. However we
want to run cron scripts on an hourly basis. What would you recommend?





--

David Johnson

***@jsatech.com

201 Main Street Suite 1320

Fort Worth, TX 76102

(877) 572-8324 x2200
Andrew McMillan
2006-03-20 18:48:39 UTC
Permalink
Post by David Johnson
One question is, I have a web application that needs to perform tasks
as the “www-data” user, rather than root. This is of course common.
However we want to run cron scripts on an hourly basis. What would
you recommend?
Hi David,

To do that you need to put a cron fragment into cron.d with the cron
jobs that you need to run.

That's pretty much the whole reason for the existence of cron.d, in
fact.

Regards,
Andrew McMillan.

-------------------------------------------------------------------------
Andrew @ Catalyst .Net .NZ Ltd, PO Box 11-053, Manners St, Wellington
WEB: http://catalyst.net.nz/ PHYS: Level 2, 150-154 Willis St
DDI: +64(4)803-2201 MOB: +64(272)DEBIAN OFFICE: +64(4)499-2267
Planning an election? Call us!
-------------------------------------------------------------------------
David Johnson
2006-03-20 20:40:44 UTC
Permalink
Great! Thanks.
-----Original Message-----
Sent: Monday, March 20, 2006 12:49 PM
To: David Johnson
Subject: Re: Cron Entries
Post by David Johnson
One question is, I have a web application that needs to perform tasks
as the "www-data" user, rather than root. This is of course common.
However we want to run cron scripts on an hourly basis. What would
you recommend?
Hi David,
To do that you need to put a cron fragment into cron.d with the cron
jobs that you need to run.
That's pretty much the whole reason for the existence of cron.d, in
fact.
Regards,
Andrew McMillan.
-------------------------------------------------------------------------
WEB: http://catalyst.net.nz/ PHYS: Level 2, 150-154 Willis St
DDI: +64(4)803-2201 MOB: +64(272)DEBIAN OFFICE: +64(4)499-2267
Planning an election? Call us!
-------------------------------------------------------------------------
--
To UNSUBSCRIBE, email to debian-webapps-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
sean finney
2006-03-20 21:39:38 UTC
Permalink
hi andrew, david,
Post by Andrew McMillan
as the ???www-data??? user, rather than root. This is of course common.
However we want to run cron scripts on an hourly basis. What would
you recommend?
To do that you need to put a cron fragment into cron.d with the cron
jobs that you need to run.
or better yet, cron.hourly :)


sean
David Johnson
2006-03-20 21:42:03 UTC
Permalink
If I understand correctly, cron.hourly does not set the user executing the
commands to anything other than root.
-----Original Message-----
Sent: Monday, March 20, 2006 3:40 PM
To: Andrew McMillan
Subject: Re: Cron Entries
hi andrew, david,
Post by Andrew McMillan
as the ???www-data??? user, rather than root. This is of course
common.
Post by Andrew McMillan
However we want to run cron scripts on an hourly basis. What would
you recommend?
To do that you need to put a cron fragment into cron.d with the cron
jobs that you need to run.
or better yet, cron.hourly :)
sean
--
To UNSUBSCRIBE, email to debian-webapps-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
'sean finney'
2006-03-20 21:53:34 UTC
Permalink
Post by David Johnson
If I understand correctly, cron.hourly does not set the user executing the
commands to anything other than root.
right you are. cron.d is the way then... or have your script
in cron.hourly su - www-data if running as root.


sean

Loading...