Forum Moderators: coopster

Message Too Old, No Replies

running a php script with no screen output

         

martindell

3:52 pm on Apr 19, 2004 (gmt 0)

10+ Year Member



I run a database import script once a day that takes ages to run and at the moment I use a cron job to get it started. The main advantage of cron is that I can use '/dev/null 2>&1' at the end of the job to run the script without any output to a terminal. The disadvantage of using cron in this way is that I have to wait for the job to run at that particular time. And now to the question ...

Is there a way to kick off a php script and specify something similar to '/dev/null 2>&1' so that I can run the job now and not get any screen output?

OR

Is there a way to run a php script to specify and run a cron job now?

Does that make any sense to anyone?

mykel79

4:11 pm on Apr 19, 2004 (gmt 0)

10+ Year Member



You're talking about running a script through the command line, like
php scriptname.php

?

If so, you can use the -q option (quiet mode).
php -q scriptname.php

martindell

1:19 pm on Apr 20, 2004 (gmt 0)

10+ Year Member



thanks, I've been told that's the correct answer but that I've asked the wrong question! Here's a better one

[webmasterworld.com...]