PDA

View Full Version : Broadcaster and Cron


joshua
04-29-2008, 07:23 AM
I am using the pro verison.

Below is my startercron script:
__________________________________________________ _____________

#Put here absolute to your broadcaster directory
$yourdir='/home/content/j/o/s/joshuadkill/html/Robinson/CGI-BIN/fmlp';
#You can run this script from cron like
#*/15 * * * * perl /home/user/http://www.owenrobinsonfamily.com/Robinson/CGI-BIN/fmlp/startercron
#in this case script will starts each 15 minutes
chdir($yourdir) || die "Can not change dir to $yourdir : $!";
exec('/usr/bin/perl broadcaster');
__________________________________________________ _________________________

What needs to be changed above?


Next, in my cron manager, of my web host control panel, I have a cron job that runs twice an hour and the command is:

__________________________________________________ __

#!/usr/bin/perl "$HOME/html/Robinson/CGI-BIN/fmlp/cron/startercron"
__________________________________________________ ________

Is this correct?

If this is all correct why do I get an error box saying there was an error in my request.

Plus, the broadcast does not work.( I understand that the broadcast only put the message in que, but the messages should go out once cron runs or activate through the home page, correct.

Joshua

drquek
04-29-2008, 09:33 PM
Q1. What you need to do for Cron to work:

Firstly you need to set up script through the CRON:

In the 'startercron' script in 'cron' folder in zip distribution, edit the line below "put here absolute path to your broadcaster directory":

$yourdir='/home/username/public_html/cgi-bin/fmlp';

Change it to your own directory path.

Secondly, you must log into your webhost's control panel and do this:

For cPanel, click the Cron Jobs to edit CRON. Select Standard.

*/25 * * * * perl /home/username/public_html/cgi-bin/fmlp/cron/startercron

What this means:
*/25 * * * * (minute, hour, day, month, day of week)
This will run a cron every 25 minutes.


Q2. Cron setting in cpanel:

It seems your command is incorrect.

I am not sure what OS or web control panel you are running. You need to contact your host about the right command for this.

blgts
04-30-2008, 12:43 AM
yo everybody in the house
before i continue...
a special message to joshua.... your cronjob must not include this # and cgi-bin must be type in small letter... try to type the path in lowercase...

try to put this in your cronjobs (use standard cronjobs , don't click advanced mode)
/usr/bin/php -q /home/yourfolder/www/cgi-bin/r/cron/startercron
15min,every hour,everyday, (adjust yourself)

yourfolder=it should be changed to your own folder given by your hosting provider

1. Check your absolute path of your startercron too
it should be :
$yourdir='/home/yourfolder/public_html/cgi-bin/r/';

again 'yourfolder' must be your own folder, it's automatically setup during installation

2. If your site is really active.... please put
img src="http://www.mydomain.com/cgi-bin/r/starter.cgi" border="0" after body tag , else put this code into subscribe.html (whaterver html file you use to get name and email)

r = r is my folder for FMLP PRO

3. go to your hosting webmail, and set your timezone according to your country's timezone.
4. check your fmlp timezone too.

5. try to subscribe yourself using gmail account /hotmail .... i don't prefer yahoo, coz this email provider has a reputation on blocking strange emails

6. if u set every 15min, means u have to wait for 15mins.... check your inbox after 15mins... you should receive your DAY 0 message (auto message)


hope this will clear all doubts

drquek
05-01-2008, 12:12 AM
Thanks Sutejo.

You can also get help on this from your web host.