473,387 Members | 1,859 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.

can i do it using cron in cpanel

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.

Aug 18 '05 #1
6 2651
sh**********@gmail.com wrote:
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. can i do it using cron in cpanel


erm maybe - if you gave some clues about what OS it's running on. Also WTF
is cpanel?

Certianly on *nix/Linux box cron is the tool to run jobs at regular
intervals but:

1) you need appropriate permissions to submit cron jobs
2) you'll need to either run it using the standalone PHP executable (which
may or may not be installed on your system) or use a command line tool like
curl/lynx/wget... to fetch the page from the webserver.

C.
Aug 18 '05 #2
sh**********@gmail.com wrote:
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.

Just as you thought. Use the cpanel cron manager. (Are you having a
specific problem?)

--
*****************************
Chuck Anderson • Boulder, CO
http://www.CycleTourist.com
Integrity is obvious.
The lack of it is common.
*****************************
Aug 18 '05 #3
can you guys write for me a command for me, like i have a page in
www.mydomain.com/demo/messages.php and i want this page to be called
from the cron job after every day

Aug 20 '05 #4
i am using cpanel and i am a webmaster my project is developed in php
and i can see that i have cron job faclility in cpanel. With standard
and advance options can you please tell me which command should i set
up so that it could open mypage.php every day . Thanks i advance

Aug 20 '05 #5
sh**********@gmail.com wrote:
can you guys write for me a command for me, like i have a page in
www.mydomain.com/demo/messages.php and i want this page to be called
from the cron job after every day


There are others who are much smarter than me and may be able to give you
better advice. However, it crosses my mind that you may want to look at
lynx. This is a text-only browser that will open a file from the command
line. It will also process commands from a script. I would think it would
be an easy job to create a short lynx script to open your php file and then
exit. I suspect that if lynx simply accesses the php file it would "run"
the code for you. It would then be a trivial exercise to insert that script
into your crontab.

--George
Aug 20 '05 #6
cron can be tricky to set up and it depends on how your ISP has things set up.
but if you can get to the cron tab section you need to enter a command like this

/usr/bin/php /home/httpd/vhosts/YOUR_DOMMANI.COM/httpdocs/clients/CRON.php > /dev/null

the first part of string tells cron "hey i want to run a PHP cron file and this is the location
where PHP is located

then there is a space

then you need to specifiy the full path to the (the way the server sees it to the file you want to
run as a cron)

you also set the time interval if you want daily at noon put a 12 in the hours box
you can put * in the other boxes

another tip create a file called phpinfo.php
in that file

<?php
phpinfo();
?>
save > upload > and then run that file you will see all the settings and paths your server uses
good tip for figuring out the cron command paths

On Thu, 18 Aug 2005 09:18:17 +0100, Colin McKinnon <co**************@andthis.mms3.com> wrote:
sh**********@gmail.com wrote:
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.

can i do it using cron in cpanel


erm maybe - if you gave some clues about what OS it's running on. Also WTF
is cpanel?

Certianly on *nix/Linux box cron is the tool to run jobs at regular
intervals but:

1) you need appropriate permissions to submit cron jobs
2) you'll need to either run it using the standalone PHP executable (which
may or may not be installed on your system) or use a command line tool like
curl/lynx/wget... to fetch the page from the webserver.

C.


Aug 20 '05 #7

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

Similar topics

2
by: KeOu | last post by:
Hi, We are running a application on the Linux, and would like to have a web interface to restart it remotely using PHP. I would like to get an advice on how to do it. Thanks. KeOu
2
by: volantecho | last post by:
hi, i m using webmin to create a cron job of a php script. While i click on 'run it now', it works, generate the output. However, the php script doesnt execute for every minutes which i've set...
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...
3
by: the.natalie | last post by:
Hi. I am a newbie to mysql, cron, and shell scripting, so please bear with me. I have a script that is used for updating an image directory based on contents in a database. The script does the...
1
by: vssp | last post by:
Hi friends Is it posssible to create an email account in the cpanel without manualy logging in ? I want to create a php script which logs into the cpanel and create an email account . I hope i would...
15
by: Craig Hurley | last post by:
Hello, user@x.com receives an email from user@a.com. I want to forward that email to user@y.com. I want the contents/header to remain intact, with the exception of adding "X-Forwarded-For". ...
4
by: Stephen Cattaneo | last post by:
Hello all, I am attempting to execute an automated test (written in Python) via cron. I have to check the HOSTNAME variable as part of the test, oddly under cron the HOSTNAME environment...
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...
1
by: Karthik Gurusamy | last post by:
Hi, I'm working on a cron like functionality for my application. The outer loops runs continuously waking every x seconds (say x=180, 300, ..). It needs to know what events in cron has expired...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.