473,387 Members | 1,569 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

cron jobs in PHP admin to run a PHP file

I want to run a php script every day. The page goes to a directory
and
parses a file and adds data to the database. Where it says "command"
in cron jobs I don't know what it is looking for? Can I put the name
of my php file?

This is what I have:

Minute Hour Day Month Weekday Command
1 8 1-7 1-31
* myPage.php

The reason I am asking is I don't have a clue what PHPadmin wants in
the command box. All I want to do is run the php script.

Thanks,
janis
Jun 2 '08 #1
5 1711
JRough wrote:
>I want to run a php script every day. The page goes to a directory
and
parses a file and adds data to the database. Where it says "command"
in cron jobs I don't know what it is looking for? Can I put the name
of my php file?

This is what I have:

Minute Hour Day Month Weekday Command
1 8 1-7 1-31
* myPage.php

The reason I am asking is I don't have a clue what PHPadmin wants in
the command box. All I want to do is run the php script.

Thanks,
janis
usually you would put the path to the php interpreter followed by any
required options followed by the script file name
Jun 2 '08 #2
On May 27, 12:17 pm, JRough <jlro...@yahoo.comwrote:
I want to run a php script every day. The page goes to a directory
and
parses a file and adds data to the database. Where it says "command"
in cron jobs I don't know what it is looking for? Can I put the name
of my php file?

This is what I have:

Minute Hour Day Month Weekday Command
1 8 1-7 1-31
* myPage.php

The reason I am asking is I don't have a clue what PHPadmin wants in
the command box. All I want to do is run the php script.

Thanks,
janis
You will want something like
01 8 * * * /usr/bin/php /<full_path>/myPage.php

I believe this will run daily at 8:01 and it will execute your php
page.
Jun 2 '08 #3
JRough wrote:
I want to run a php script every day. The page goes to a directory
and
parses a file and adds data to the database. Where it says "command"
in cron jobs I don't know what it is looking for? Can I put the name
of my php file?

This is what I have:

Minute Hour Day Month Weekday Command
1 8 1-7 1-31
* myPage.php

The reason I am asking is I don't have a clue what PHPadmin wants in
the command box. All I want to do is run the php script.

Thanks,
janis

The program needs to be your PHP CLI executable. Parameter should be
-f <your script filename>

(You can leave out the -f - but I leave it in for clarity).

Ensure the cron user has permission to execute your php executable and
read access to the script (plus the appropriate access to any other
resources required).
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Jun 2 '08 #4
On May 27, 11:32 am, "Paul Lautman" <paul.laut...@btinternet.com>
wrote:
JRough wrote:
I want to run a php script every day. The page goes to a directory
and
parses a file and adds data to the database. Where it says "command"
in cron jobs I don't know what it is looking for? Can I put the name
of my php file?
This is what I have:
Minute Hour Day Month Weekday Command
1 8 1-7 1-31
* myPage.php
The reason I am asking is I don't have a clue what PHPadmin wants in
the command box. All I want to do is run the php script.
Thanks,
janis

usually you would put the path to the php interpreter followed by any
required options followed by the script file name
SO the php interpreter would be normally be in my http docs somewhere
under where I installed php
but this server is web hosted so I'm assuming it is the url I use to
run the scirpt in my browser.
thanks,
Jun 2 '08 #5
JRough wrote:
On May 27, 11:32 am, "Paul Lautman" <paul.laut...@btinternet.com>
wrote:
>JRough wrote:
>I want to run a php script every day. The page goes to a directory
and
parses a file and adds data to the database. Where it says
"command" in cron jobs I don't know what it is looking for? Can I
put the name of my php file?
This is what I have:
Minute Hour Day Month Weekday
Command 1 8 1-7 1-31
* myPage.php
The reason I am asking is I don't have a clue what PHPadmin wants
in the command box. All I want to do is run the php script.
Thanks,
janis

usually you would put the path to the php interpreter followed by any
required options followed by the script file name

SO the php interpreter would be normally be in my http docs somewhere
under where I installed php
but this server is web hosted so I'm assuming it is the url I use to
run the scirpt in my browser.
thanks,
You assume incorrectly. Your hosting company should tell you what the path
is (it is usually the path that BravoFoxtrot mentioned). They may have it in
a faq somewhere.
Jun 2 '08 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: sherryonline | last post by:
i have a page and i need that page to be called every day at 12:00 that page is going to connect to the database fetch some emails and will start mailing them how i am goning to do this.
4
by: vagrantbrad | last post by:
I'm using python 2.4 running on Fedora Core 4. I have written a python program called ipscan.py that checks the external ip address of my cable internet connection, and on change, will update the...
6
by: giangiammy | last post by:
I don't know if this is possible, but I need to accomplish an action at a given hour (what cron does): is it possible to do something like this having a web hosting service with php support? ...
4
by: Rahul | last post by:
Hello All, I have come accross a very interesting as well as a very complex scenario with my current project. My worry is the scheduling of email messages and execution of that based on the cron...
10
TheServant
by: TheServant | last post by:
I apologies if this is in the wrong place, but I have a basic question about CRON jobs. My provider has a little program, which I am guessing automatically creates CRON jobs. Basically I check boxes...
5
by: Josh | last post by:
I have a website w/ Yahoo Web Hosting and unfortunately they do not allow use of cron jobs. My site sends out automated personalized e- mails on a regularly scheduled basis, currently via the...
5
by: Lawrence Krubner | last post by:
Do any problems come up when using a static variable in a cron job? Assuming the cron job is called every 5 minutes for one year. Assume I've got an array that stores the names of which users are...
0
by: Cameron Simpson | last post by:
On 17Aug2008 21:25, John Nagle <nagle@animats.comwrote: Because $HOSTNAME is a bash specific variable, set by bash but NOT EXPORTED! Like $0 and a bunch of other "private" variables, subprocesses...
4
by: ujwalarali85 | last post by:
I some script located in following file http://myserver/imp/dothis.php I want to set cron job so that this file will run daily. At Webmin I have menu 'Scheduled Cron Jobs' and create new cron...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.