Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

Cron Jobs -> Config Question

 
   Web Hosting and Web Master Forums (Home) -> Webmaster RSS
Next:  dEUS  
Author Message
reply2

External


Since: Feb 04, 2004
Posts: 2



(Msg. 1) Posted: Thu Feb 05, 2004 2:15 am
Post subject: Cron Jobs -> Config Question
Archived from groups: alt>www>webmaster (more info?)

I hope someone in this group can help. I am familiar with running cron
jobs, but have run into a particular syntax that I cannot get around. I
need to run a file on my server a couple of times a day. The file is a PHP
file, but it requires several arguments after the file name ....
file.php?a=1&b=2&c=3. First I tried simply entering this string into the
crontab, but got nothing (like this: php
/home/mySite/.../file.php?a=1&b=2&c=3 [where '...' is me truncating the
address for this post]).

Then I put this command into an .sh file like this:

#!/bin/bash
php
/home/mySite/public_html/bin/export.php?db=all&db_list=&comments=none&tables
=on&data=on

After which, I entered this into my Cron Manager like this: sh
/home/mySite/.../file.sh <-name of my sh file. Still, this job will not
run.

Any ideas on how to run a cron job like the one I am working with here?

Much thanks!
Kevin Mc.

 >> Stay informed about: Cron Jobs -&gt; Config Question 
Back to top
Login to vote
reply2

External


Since: Feb 04, 2004
Posts: 2



(Msg. 2) Posted: Thu Feb 05, 2004 3:14 am
Post subject: Re: Cron Jobs -> Config Question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

i took the long way around, and edited the PHP file ... removing all "if /
elseif" statements and simply hard-coded the results i wanted. it worked
like a charm.

thanks to all for your help.
KMc

 >> Stay informed about: Cron Jobs -&gt; Config Question 
Back to top
Login to vote
user104

External


Since: Jun 28, 2003
Posts: 1662



(Msg. 3) Posted: Thu Feb 05, 2004 3:20 am
Post subject: Re: Cron Jobs -> Config Question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Kevin Mc" <reply RemoveThis @to.group> wrote in message
news:HVfUb.20260$8k1.9083@newssvr27.news.prodigy.com...
 > i took the long way around, and edited the PHP file ... removing all "if /
 > elseif" statements and simply hard-coded the results i wanted. it worked
 > like a charm.
 >
 > thanks to all for your help.

Nice one, "necessity is the mother of invention!"
--
Charles Sweeney
<a style='text-decoration: underline;' href="http://www.CharlesSweeney.com" target="_blank">www.CharlesSweeney.com</a><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Cron Jobs -&gt; Config Question 
Back to top
Login to vote
who

External


Since: Apr 29, 2004
Posts: 1010



(Msg. 4) Posted: Thu Feb 05, 2004 3:29 pm
Post subject: Re: Cron Jobs -> Config Question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Kevin Mc" <reply DeleteThis @to.group> wrote in message
news:Y1fUb.20231$HR.4028@newssvr27.news.prodigy.com...
 > I hope someone in this group can help. I am familiar with running cron
 > jobs, but have run into a particular syntax that I cannot get around. I
 > need to run a file on my server a couple of times a day. The file is a
PHP
 > file, but it requires several arguments after the file name ....
 > file.php?a=1&b=2&c=3. First I tried simply entering this string into the
 > crontab, but got nothing (like this: php
 > /home/mySite/.../file.php?a=1&b=2&c=3 [where '...' is me truncating the
 > address for this post]).
 >
 > Then I put this command into an .sh file like this:
 >
 > #!/bin/bash
 > php
 >
/home/mySite/public_html/bin/export.php?db=all&db_list=&comments=none&tables
 > =on&data=on
 >
 > After which, I entered this into my Cron Manager like this: sh
 > /home/mySite/.../file.sh <-name of my sh file. Still, this job will not
 > run.
 >
 > Any ideas on how to run a cron job like the one I am working with here?
 >
 > Much thanks!
 > Kevin Mc.
 >
Why not just call a plain php file that has in it an include to the one with
variables?
cron will run the plain file, say main.php and php will take care of the
rest in the normal way<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Cron Jobs -&gt; Config Question 
Back to top
Login to vote
user104

External


Since: Jun 28, 2003
Posts: 1662



(Msg. 5) Posted: Thu Feb 05, 2004 3:29 pm
Post subject: Re: Cron Jobs -> Config Question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Bill Logan" <who.TakeThisOut@what.com> wrote in message news:402181bc@clear.net.nz...

 > Why not just call a plain php file that has in it an include to the one
with
 > variables?
 > cron will run the plain file, say main.php and php will take care of the
 > rest in the normal way

I was thinking along the same lines. Run a plain PHP file, but get the
variables from a database.
--
Charles Sweeney
<a style='text-decoration: underline;' href="http://www.CharlesSweeney.com" target="_blank">www.CharlesSweeney.com</a><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Cron Jobs -&gt; Config Question 
Back to top
Login to vote
who

External


Since: Apr 29, 2004
Posts: 1010



(Msg. 6) Posted: Thu Feb 05, 2004 4:23 pm
Post subject: Re: Cron Jobs -> Config Question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Charles Sweeney" <me RemoveThis @charlessweeney.com> wrote in message
news:bvrvr9$v9c01$1@ID-162618.news.uni-berlin.de...
 > "Bill Logan" <who RemoveThis @what.com> wrote in message news:402181bc@clear.net.nz...
 >
  > > Why not just call a plain php file that has in it an include to the one
 > with
  > > variables?
  > > cron will run the plain file, say main.php and php will take care of the
  > > rest in the normal way
 >
 > I was thinking along the same lines. Run a plain PHP file, but get the
 > variables from a database.
yeah, some people often forget that cron is like an omeba, just a simple
(one celled) critter. with an on/off switch. The real power lies in the
script called by cron to do the work:-)<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Cron Jobs -&gt; Config Question 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Jobs - Are there sites out there where people post jobs for websites liike design or php programming and people can offer prices to get the job? Please post them... thank you. -- Sharif Tanvir Karim http://www.onlyonxbox.net

Bid on Jobs - Are there any web-sites out there that allow you to look at website specs and bid on jobs? Thanks in advance Jw

red hat/cpanel/cron help needed... Please? - Ok I have a few sites that all need cron to run to work/update... There was so many running at tone time it would crash the server... A friend told me to try this.. login as root and in cron put */20 * * * * /home/jwshcom/CCcrons.sh >/dev/null 2>...

PHP question - For a NON-Technical person how easy is it to learn PHP ? (for website changes - mostly minor changes) If any one would be kind enough to let me know I would appreciate it. Thanks Sarah

Web Log Question - Hi, I sometimes see the following on my website's log file. It looks like the visitor's browser is making multiple requests for the same image file. However, when I access my website, I could never reproduce this. I wonder what causes this and what...
   Web Hosting and Web Master Forums (Home) -> Webmaster All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]