This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Cron Jobs (broken)
#1
Cron Jobs (broken)
Hey guys,

I need to setup a cronjob like :
my_domain_name/index.php?option=com_easysocial&cron=true&phrase=nottellingyou

Comes up with script not found however :
my_domain_name/index.php

Creates the cronjob fine.

So Im guessing Sentora, thinking it's a smart cookie looks for the file name which doesn't exist beyond index.php and spits the dummy. Any ideas on how to fix?


Craig
Reply
Thanks given by:
#2
RE: Cron Jobs (broken)
This may help: http://forums.sentora.org/showthread.php...72#pid6072
-TGates - Project Council

SEARCH the Forums or read the DOCUMENTATION before posting!
Support Sentora and Donate: HERE

Find my support or modules useful? Donate to TGates HERE
Developers and code testers needed!
Contact TGates for more information
Reply
Thanks given by:
#3
RE: Cron Jobs (broken)
you can create a file mycron.php that curl the URL and setup the cron to run that file.

M B
No support using PM (Auto adding to IGNORE list!), use the forum. 
How to ask

200$ free to start your VPS 60 days credit
Reply
Thanks given by:
#4
RE: Cron Jobs (broken)
(02-08-2016, 06:27 AM)Me.B Wrote: you can create a file mycron.php that curl the URL and setup the cron to run that file.

M B
Me.B,
Can you post an example on that linked page above? Will be nice to have more examples Wink
-TGates - Project Council

SEARCH the Forums or read the DOCUMENTATION before posting!
Support Sentora and Donate: HERE

Find my support or modules useful? Donate to TGates HERE
Developers and code testers needed!
Contact TGates for more information
Reply
Thanks given by:
#5
RE: Cron Jobs (broken)
Create a file mycron.php:

Code:
<?php
       // create curl resource
       $ch = curl_init();
     $myurl="my_domain_name/index.php?option=com_easysocial&cron=true&phrase=nottellingyou";

       // set url
       curl_setopt($ch, CURLOPT_URL, $myurl);

       //return the transfer as a string
       curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

       // $output contains the output string
       $output = curl_exec($ch);

       // close curl resource to free up system resources
       curl_close($ch);      
?>
PHP Docs
http://php.net/manual/en/curl.examples.php
Then create a cron in sentora to run mycron.php.

That would do the trick.

M B
No support using PM (Auto adding to IGNORE list!), use the forum. 
How to ask

200$ free to start your VPS 60 days credit
Reply
Thanks given by:
#6
RE: Cron Jobs (broken)
(02-06-2016, 12:39 PM)craig@rtech.co.nz Wrote: Hey guys,

I need to setup a cronjob like :
my_domain_name/index.php?option=com_easysocial&cron=true&phrase=nottellingyou

Comes up with script not found however :
my_domain_name/index.php

Creates the cronjob fine.

So Im guessing Sentora, thinking it's a smart cookie looks for the file name which doesn't exist beyond index.php and spits the dummy.  Any ideas on how to fix?


Craig
I use joomla to, but for jomsocial. I dont use Sentoras cron, but crontab instead.
crontab -e
This is mine:
*/10 * * * * lynx -source "http://www.my_domain/index.php?option=com_community&task=cron" > /dev/null
Every 10 min it checking jomsocial for sending email or transcode.
If you dont have lynx, just install it with apt-get install lynx
Reply
Thanks given by:
#7
RE: Cron Jobs (broken)
Why installing lynx?? You already have Wget that can do it or curl.

M B
No support using PM (Auto adding to IGNORE list!), use the forum. 
How to ask

200$ free to start your VPS 60 days credit
Reply
Thanks given by:
#8
RE: Cron Jobs (broken)
(02-09-2016, 06:47 AM)Me.B Wrote: Why installing lynx?? You already have Wget that can do it or curl.

M B
Lynx has work best for me when i run cron for joomla. U can use wget or curl as you say, but i have got problems with both, thats why i use lynx.
Reply
Thanks given by:


Possibly Related Threads…
Thread Author Replies Views Last Post
Uninstalled but have cron daemon issues now HELP suprastan 1 5 ,322 10-07-2018, 03:26 AM
Last Post: TGates
Cron Job Issue: Error: System Cron file could not be created. nscloud 6 15 ,988 07-04-2018, 02:32 AM
Last Post: TGates
All time problems with Cron franmm25 6 13 ,504 07-03-2018, 07:08 AM
Last Post: Me.B

Forum Jump:


Users browsing this thread: 1 Guest(s)