Joomla!ŪPlug

. XCloner - Backup and Restore Component

OOPS. Your Flash player is missing or outdated.Click here to update your player so you can see this content.
Joomla backup and restore component

XCloner for Wordpress new!

 
 
JoomlaPlug.com
Welcome, Guest
Please Login or Register.    Lost Password?
Can JCRON run with a non-absolute adress? (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: Can JCRON run with a non-absolute adress?
#6750
Marcel Hoog Antink (User)
Fresh Boarder
Posts: 6
graphgraph
User Offline Click here to see the profile of this user
Can JCRON run with a non-absolute adress? 1 Year, 3 Months ago  
I Use JCRON and it works well.
I use the type fopen() and fsockopen().

I am used to copy my libe site to a local XAMPP-site, so I can test new options offline.

At thos moment the Jcron command has an absolute address starting with
http://www.mydomain.com/commandline.php

This results in the situation that the online cronjob is started from my local offline website when I am testing

How can I avoid this? Is a non-absolute run-command possible with out the http:// and the doaminname ??
Like:
/commandline.php

Or can I inclued a variable for the domain?
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#6751
Ovidiu - Support! (Admin)
Admin
Posts: 2927
graph
User Online Now Click here to see the profile of this user
joomlaplug JoomlaPlug.com
Re:Can JCRON run with a non-absolute adress? 1 Year, 3 Months ago  
Hi there! Why not use your local url address, like http://localhost/commandline.php to run that script?

Ovidiu
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#6752
Marcel Hoog Antink (User)
Fresh Boarder
Posts: 6
graphgraph
User Offline Click here to see the profile of this user
Re:Can JCRON run with a non-absolute adress? 1 Year, 3 Months ago  
Thanks for your answer.

I try to make the site so that it can be run on both the online as the offline site, without any change.
That's the easiest way to not forget a change.

Do you think localhost will work on the online site?
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#6753
Ovidiu - Support! (Admin)
Admin
Posts: 2927
graph
User Online Now Click here to see the profile of this user
joomlaplug JoomlaPlug.com
Re:Can JCRON run with a non-absolute adress? 1 Year, 3 Months ago  
If you are referring to the cron, it will only run when you have frontend activity, so i am not sure if for a local site, it will work properly

Ovidiu
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#6754
Marcel Hoog Antink (User)
Fresh Boarder
Posts: 6
graphgraph
User Offline Click here to see the profile of this user
Re:Can JCRON run with a non-absolute adress? 1 Year, 3 Months ago  
Hi there,

I tried the following on the Online-site:

Type= fopen()
I entered In Run Command: http://localhost/crontest.php

I got the following log:

============================
JCron Daemon




Query: UPDATE #__jcron_tasks SET ran_at= '2011-02-14 11:00:02', log_text='Unable to open http://localhost/crontest.php


LOCAL CRON DEBUG:


<b>Working on cron schedule: * * * * *</b>
Months array
Array: 0=>1, 1=>2, 2=>3, 3=>4, 4=>5, 5=>6, 6=>7, 7=>8, 8=>9, 9=>10, 10=>11, 11=>12,
Cron is due this month, getting days array.
Number of days in 2011-2 : 28
Days array matching weekdays for 2011-2
Array: 0=>1, 1=>2, 2=>3, 3=>4, 4=>5, 5=>6, 6=>7, 7=>8, 8=>9, 9=>10, 10=>11, 11=>12, 12=>13, 13=>14, 14=>15, 15=>16, 16=>17, 17=>18, 18=>19, 19=>20, 20=>21, 21=>22, 22=>23, 23=>24, 24=>25, 25=>26, 26=>27, 27=>28,
Due to run today
Hour array
Array: 0=>0, 1=>1, 2=>2, 3=>3, 4=>4, 5=>5, 6=>6, 7=>7, 8=>8, 9=>9, 10=>10, 11=>11, 12=>12, 13=>13, 14=>14, 15=>15, 16=>16, 17=>17, 18=>18, 19=>19, 20=>20, 21=>21, 22=>22, 23=>23,
Due this hour
Minutes array
Array: 0=>0, 1=>1, 2=>2, 3=>3, 4=>4, 5=>5, 6=>6, 7=>7, 8=>8, 9=>9, 10=>10, 11=>11, 12=>12, 13=>13, 14=>14, 15=>15, 16=>16, 17=>17, 18=>18, 19=>19, 20=>20, 21=>21, 22=>22, 23=>23, 24=>24, 25=>25, 26=>26, 27=>27, 28=>28, 29=>29, 30=>30, 31=>31, 32=>32, 33=>33, 34=>34, 35=>35, 36=>36, 37=>37, 38=>38, 39=>39, 40=>40, 41=>41, 42=>42, 43=>43, 44=>44, 45=>45, 46=>46, 47=>47, 48=>48, 49=>49, 50=>50, 51=>51, 52=>52, 53=>53, 54=>54, 55=>55, 56=>56, 57=>57, 58=>58, 59=>59, 60=>60,
Due this very minute or some earlier minutes before this moment within this hour.
Parsing * * * * * taken 0.000413 seconds
LAST DUE: 11:0 on 14/2/2011', last_run = 1 WHERE id='5'




============================

when I replace the localhost with the actual domainname it works OK.

What did I wrong here, or is localhost not possible on the online site ??
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#6755
Ovidiu - Support! (Admin)
Admin
Posts: 2927
graph
User Online Now Click here to see the profile of this user
joomlaplug JoomlaPlug.com
Re:Can JCRON run with a non-absolute adress? 1 Year, 3 Months ago  
Try replacing localhost with 127.0.0.1 and see if it helps

Ovidiu
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop

Search JoomlaPlug.com

All rights reserved to JoomlaPlug.com ©2006-2012!

The Joomla!® name is used under a limited license from Open Source Matters in the United States and other countries.
JoomlaPlug.com is not affiliated with or endorsed by Open Source Matters or the Joomla! Project.