HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   General (http://www.howtoforge.com/forums/forumdisplay.php?f=25)
-   -   server wide cron job (http://www.howtoforge.com/forums/showthread.php?t=59766)

manarak 2nd December 2012 14:53

server wide cron job
 
I need to run some cron jobs on PHP scripts that should have server-wide access, what would be the best location to store them and how to set them up so that they don't have any permissions issues?

falko 3rd December 2012 09:45

You can set them up as root by running
Code:

crontab -e

manarak 3rd December 2012 10:10

thank you Falko

I need to test the script first, is there a way to execute the PHP script from http with root privileges?

would something like that work if I add it to /etc/sudoers
Code:

web1 ALL=(ALL) NOPASSWD: /usr/bin/php -f /var/www/clients/client1/web/myscript.php
?


All times are GMT +2. The time now is 23:23.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.