CRON Question

XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).

Moderator: General Moderators

Post Reply
randomblink
Forum Commoner
Posts: 51
Joined: Wed Jan 28, 2004 11:27 am
Location: Tulsa, Oklahoma, just this side of hell...
Contact:

CRON Question

Post by randomblink »

Alright...
I have searched through alot of postings that contain Cron in them... They all either point to other postings about Cron or to websites about Cron. I have googled and found nothing that helped, so...

Here I am asking...
Does anyone know of a Manual / Tutorial for using Cron from CPanel?

My host offers Cron via CPanel.
I am uncertain how to pass arguments to a PHP file.

For instance...
I want to have the Cron file run:
example.php?username=me&password=secret

I can't find the details on how to do this.
Any help would be appreciated...

Thanks in advance...
User avatar
dyconsulting
Forum Newbie
Posts: 14
Joined: Mon Dec 01, 2003 6:52 pm
Location: San Francisco

Post by dyconsulting »

randomblink
Forum Commoner
Posts: 51
Joined: Wed Jan 28, 2004 11:27 am
Location: Tulsa, Oklahoma, just this side of hell...
Contact:

CRON

Post by randomblink »

Well...
That is the same information that is available on my hosts CPANEL Documentation section... However, it doesn't offer instructions on how to pass arguments to the Command you load.

I now, at least, understand how to point it to the php file I want to execute... But how do I send any arguments?
User avatar
patrikG
DevNet Master
Posts: 4235
Joined: Thu Aug 15, 2002 5:53 am
Location: Sussex, UK

Post by patrikG »

If you use the powerful search-feature on this forum and type in "cron job", you will notice that the answer is out there already.

search.php will yield threads like viewtopic.php?t=21687

What is mentioned in there are some cron job tutorials:

http://www.4webhelp.net/tutorials/misc/cron.php
http://www.webgfxcenter.com/tutorials/t ... m/155/PHP/

Easy, really. Isn't it?
User avatar
anjanesh
DevNet Resident
Posts: 1679
Joined: Sat Dec 06, 2003 9:52 pm
Location: Mumbai, India

Post by anjanesh »

I added in my cpanel - Advanced Unix style : (to see how cron works)

Mail will be sent to anjanesh@hotmail.com
* * * * *
Command : GET http://domian.com/subfolder/mail.php > /dev/null

mail.php is just a script to send a 1 word mail to my hotmail a/c. The script works.
* * * * * indicates every min,hr etc etc
But Im not getting anything in my hotmail a/c. I've been checking for an hr or so. Still no mail. When I run the script in the browser the mail is sent almost atonce.
Is there anything wrong with the command because this is what was given one tutorial.
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

make sure you are sending the correct headers because hotmail will filter them out
Post Reply