Log In
Sign Up
Why Join Hot Scripts?
Hot Scripts
All Categories
PHP
Python
Tools & Utilities
XML
Ruby on Rails
Ajax
Web Hosting
ASP
ASP.NET
C & C++
CFML
Flash
Java
JavaScript
CGI & Perl
HTML5
Forums
Blog
Scripts
Hosted Apps
Plugins
Design Templates
Forum
Blog
Advertise
Contact Us
Register
FAQ
Rules
Calendar
Search
Today's Posts
Mark Forums Read
RSS Feeds
Current location:
Hot Scripts Forums
»
Programming Languages
»
PHP
» CRON JOB with php file
CRON JOB with php file
LinkBack
Thread Tools
Display Modes
#
1
(
permalink
)
06-23-07, 06:17 PM
Jay6390
Code Master
Join Date: Apr 2007
Location: United Kingdom
Posts: 1,330
Thanks: 0
Thanked 0 Times in 0 Posts
CRON JOB with php file
Hi, i am wanting to use a cron job with my php file, and if possible use ?x=value at the end, ie
PHP Code:
www
.
site
.
com
/
script
.
php
?
name
=
jay
or
PHP Code:
/
home
/
jay6390
/
public_html
/
script
.
php
?
name
=
jay
1. Is it possible to do this (please note i am using cPanel)
2. which of the two above should i use for this
Many thanks
Jay
__________________
www.jaygilford.com
Useful Tutorials
[
PHP
Video
-
1
-
2
-
3
] [
MySQL
1
-
2
-
3
]
For any php function reference type
www.php.net/
FunctionName
Jay6390
View Public Profile
Visit Jay6390's homepage!
Find all posts by Jay6390
#
2
(
permalink
)
06-23-07, 09:42 PM
koncept
Guest
Posts: n/a
im pretty sure its the second one. your host should have a good guide based on their security policy
koncept
#
3
(
permalink
)
06-23-07, 09:46 PM
Jay6390
Code Master
Join Date: Apr 2007
Location: United Kingdom
Posts: 1,330
Thanks: 0
Thanked 0 Times in 0 Posts
thanks, i'll contact them as well
Jay
__________________
www.jaygilford.com
Useful Tutorials
[
PHP
Video
-
1
-
2
-
3
] [
MySQL
1
-
2
-
3
]
For any php function reference type
www.php.net/
FunctionName
Jay6390
View Public Profile
Visit Jay6390's homepage!
Find all posts by Jay6390
#
4
(
permalink
)
06-23-07, 09:51 PM
Jay6390
Code Master
Join Date: Apr 2007
Location: United Kingdom
Posts: 1,330
Thanks: 0
Thanked 0 Times in 0 Posts
just have
"I'm sorry, I'm afraid I can't assist you with that problem"
Very f***ing useful!
Poo!
__________________
www.jaygilford.com
Useful Tutorials
[
PHP
Video
-
1
-
2
-
3
] [
MySQL
1
-
2
-
3
]
For any php function reference type
www.php.net/
FunctionName
Jay6390
View Public Profile
Visit Jay6390's homepage!
Find all posts by Jay6390
#
5
(
permalink
)
06-23-07, 10:49 PM
Sxooter
Newbie Coder
Join Date: Jun 2007
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Does your machine have wget on it?
wget
http://site.com/script.html?arg1=val1
__________________
Post a clear description of your problem, your code in code tags, your errors, and wait. Because nobody here's a mind reader...
Sxooter
View Public Profile
Find all posts by Sxooter
#
6
(
permalink
)
06-23-07, 11:13 PM
Jay6390
Code Master
Join Date: Apr 2007
Location: United Kingdom
Posts: 1,330
Thanks: 0
Thanked 0 Times in 0 Posts
i dont know. how can i tell in cpanel?
__________________
www.jaygilford.com
Useful Tutorials
[
PHP
Video
-
1
-
2
-
3
] [
MySQL
1
-
2
-
3
]
For any php function reference type
www.php.net/
FunctionName
Jay6390
View Public Profile
Visit Jay6390's homepage!
Find all posts by Jay6390
#
7
(
permalink
)
06-24-07, 09:11 AM
Jay6390
Code Master
Join Date: Apr 2007
Location: United Kingdom
Posts: 1,330
Thanks: 0
Thanked 0 Times in 0 Posts
Sorted
just needed to run via php with the following
php
/
home
/
jay6390
/
public_html
/
script
.
php
I cant do it with the ? in it though. does anyone have any suggestions as to how i can
achieve this?
Thanks
Jay
__________________
www.jaygilford.com
Useful Tutorials
[
PHP
Video
-
1
-
2
-
3
] [
MySQL
1
-
2
-
3
]
For any php function reference type
www.php.net/
FunctionName
Jay6390
View Public Profile
Visit Jay6390's homepage!
Find all posts by Jay6390
#
8
(
permalink
)
06-24-07, 01:53 PM
Sxooter
Newbie Coder
Join Date: Jun 2007
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
You'll need to rewrite it to $argv[] $argc and give it arguments.
so,if you call it as:
/home/jay6390/public_html/script.php filename emailaddress
then the script would have:
$argc=3
$argv[0] = /home/jay6390/public_html/script.php
$argv[1] = filename
$argv[2] = emailaddress
best way to find out if you have wget is to just try it. i.e. make a cron entry and see if it works.
__________________
Post a clear description of your problem, your code in code tags, your errors, and wait. Because nobody here's a mind reader...
Sxooter
View Public Profile
Find all posts by Sxooter
#
9
(
permalink
)
06-24-07, 02:05 PM
Sxooter
Newbie Coder
Join Date: Jun 2007
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
P.s. read this
page
on using php from the command line for more info.
__________________
Post a clear description of your problem, your code in code tags, your errors, and wait. Because nobody here's a mind reader...
Sxooter
View Public Profile
Find all posts by Sxooter
Bookmarks
Digg
del.icio.us
StumbleUpon
Google
«
Query
|
PHP Resource
»
Currently Active Users Viewing This Thread: 1
(0 members and 1 guests)
Thread Tools
Show Printable Version
Email this Page
Display Modes
Linear Mode
Switch to Hybrid Mode
Switch to Threaded Mode
Posting Rules
You
may not
post new threads
You
may not
post replies
You
may not
post attachments
You
may not
edit your posts
BB code
is
On
Smilies
are
On
[IMG]
code is
Off
HTML code is
Off
Trackbacks
are
On
Pingbacks
are
On
Refbacks
are
On
Forum Rules
Forum Jump
User Control Panel
Private Messages
Subscriptions
Who's Online
Search Forums
Forums Home
General Community
Announcements
Polls
The Lounge
New Members & Introductions
Script Requests
HotScripts.com Discussion
Hot Scripts Forum Questions, Suggestions and Feedback
General HotScripts Site Discussion
HotScripts Site Bug Reports
General Web Coding
HTML/XHTML/XML
HTML5
JavaScript
CSS
Flash & ActionScript
Programming Languages
PHP
Perl
ASP
ASP.NET
C/C++
Visual Basic
Windows .NET Programming
Everything Java
Other Languages
Other Discussions
Web Servers
Database
Other Topics
Web Design
API
Frameworks
AJAX
Security
Server Administration
Portable Device Programming
Cloud Computing
Ruby on Rails
CFML
Python
Tools and Utilities
Remotely Hosted
Web Hosting
Advertising Forums
General Advertisements
Job Offers & Assistance
Traffic Exchange
Website Reviews
Web Hosting Talk
DBForums.com
Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
automatically send email to the particular person everyday
sujata_ghosh
PHP
7
10-04-11
05:00 PM
PHP displaying in .HTML file
tennis4you
PHP
6
12-31-06
08:17 PM
Edit Text File with PHP
jengels
PHP
2
12-07-06
11:04 AM
PHP based File Tracker project
valtea
Script Requests
0
09-08-05
02:04 PM
Cron Job Error
Tempestshade
PHP
6
09-10-04
05:10 PM
All times are GMT -5. The time now is
06:06 AM
.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
LinkBack
LinkBack URL
About LinkBacks
Bookmark & Share
Digg this Thread!
Add Thread to del.icio.us
Bookmark in Technorati
Share on Facebook
Share on Stumble Upon
Share on Twitter