Cron ???

serg5550

New Member
Messages
21
Reaction score
0
Points
0
Hello!

Tell, please, the command for performance script.php on a server.

And as:
As not all PHP-programs can work through CLI SAPI without preliminary updating, it is possible to start them through wget.
How to start them through wget?

For example I should execute the scenario during certain time:
http://mysite.com/administrator/index.php?option=com_rss2content&act=manual (mysite.com - site for an example)
Tried to write in the beginning "wget --spider ", time has set 5 for the test, - does not work.

Help, please!

Thanks!
 
Last edited:

Zubair

Community Leader
Community Support
Messages
8,766
Reaction score
305
Points
83
Hello!

Tell, please, the command for performance script.php on a server.

And as:
As not all PHP-programs can work through CLI SAPI without preliminary updating, it is possible to start them through wget.
How to start them through wget?

For example I should execute the scenario during certain time:
http://mysite.com/administrator/index.php?option=com_rss2content&act=manual (mysite.com - site for an example)
Tried to write in the beginning "wget --spider ", time has set 5 for the test, - does not work.

Help, please!

Thanks!

See this http://x10hosting.com/forums/tutorials/112491-howto-auto-backup-database-transfer-database-pics.html

This might be helpful for you
 

serg5550

New Member
Messages
21
Reaction score
0
Points
0
Cron does not work.

Here the real link for scenario performance (100 % work at start in a browser):
http://allmsfo.ru/administrator/index.php?option=com_rss2content&act=manual

I tried different starts of the scenario, - does not work:

*/5 * * * * wget -q http://allmsfo.ru/administrator/index.php?option=com_rss2content&act=manual
*/5 * * * * wget -O - http://allmsfo.ru/administrator/index.php?option=com_rss2content&act=manual
*/5 * * * * wget -q -O - http://allmsfo.ru/administrator/index.php?option=com_rss2content&act=manual
*/5 * * * * wget -O - -q http://allmsfo.ru/administrator/index.php?option=com_rss2content&act=manual

There are no notices on email.
At me a free hosting, - a problem in it?
Explain, please.
 
Last edited:

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
You mean you can't get your cron jobs to work, which is different from cron not working.

"&" is a special character in shells. Try enclosing the URLs in single quotes.
 

serg5550

New Member
Messages
21
Reaction score
0
Points
0
I tried to start other scenarios (my cron - allmsfo.ru27022010064438000000.php):

wget -q http://allmsfo.ru/components/com_rss2content/cron/allmsfo.ru27022010064438000000.php

php -q /home/serg5550/public_html/allmsfo.ru/components/com_rss2content/cron/allmsfo.ru27022010064438000000.php

/usr/bin/php -q /home/serg5550/public_html/allmsfo.ru/components/com_rss2content/cron/allmsfo.ru27022010064438000000.php

Cron does not work. Attribute at cron "777".

There are no notices on email. In error_log.txt is written:

PHP Fatal error: Call to a member function setQuery() on a non-object in /home/serg5550/public_html/allmsfo.ru/components/com_rss2content/cron/allmsfo.ru27022010064438000000.php on line 1027

What is it means?
I so think, that on a server there is an interdiction.
 
Last edited:

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
It means your script isn't handling errors. You've got a line like $db->setQuery(...), but $db isn't an object because the line that was supposed to create an object failed. Always handle errors, whether it means catching exceptions or checking return values.
 

serg5550

New Member
Messages
21
Reaction score
0
Points
0
Thanks!
I will search for the reason.
 
Last edited:

serg5550

New Member
Messages
21
Reaction score
0
Points
0
Hello!

I have solved my problem.

Thanks Boss and misson!

Please, remove my Thread (real links to my site here are located).
 

092565

New Member
Messages
20
Reaction score
0
Points
0
It's best to not delete this thread, and secondly, would you mind telling me how you solved the problem ?

Thanks
 

serg5550

New Member
Messages
21
Reaction score
0
Points
0
The problem was in the component.
I have put other component and Cron works.

The command for Cron had the following appearance:
php-q/home/............../cron.php

But this component does not suit me.

I wish good luck. Good-bye.
 
Top