New Install

Trying to install BNT? No guarantees we can help you (especially if you're hosting it on windows) but we''ll try.

User avatar
TheMightyDude
Site Admin
Posts: 311
Joined: Thu Apr 17, 2014 09:15 UTC

Re: New Install

Post by TheMightyDude » Wed Feb 01, 2017 06:50 UTC

Surfdude wrote:Ok so I have the game up and running....one final problem though.

The count-down restarts every time the screen refreshes. I don't think the cron job service is running correctly any ideas?
Yup, it seems that you haven't had an update for about 284 mins.
TheMightyDude::Blacknova Development.
Development Blog YouTube Dev Channel Twitter Twitch

Surfdude
Posts: 17
Joined: Wed Jan 25, 2017 02:09 UTC

Re: New Install

Post by Surfdude » Wed Feb 01, 2017 21:06 UTC

um yea that didn't help me a whole lot...lol

the cron job is saying that it is not seeing my file path...so I am wondering a few things on how to get it to work.

Any ideas to try would be cool.

Thanks

Rincewind
Posts: 65
Joined: Thu Nov 03, 2016 05:16 UTC

Re: New Install

Post by Rincewind » Thu Feb 02, 2017 00:04 UTC

Cron by default doesn't know any PATHs for security purposes, so if you want to use some, you have to specify them manually in your crontab.
In your case, I don't see a reason why you would need paths (especially since you already have an absolute path to your lynx binary in your command)

First command to issue:

`which lynx` (without quotes) - this will tell you whether lynx binary is found in your PATH in bash. If yes, that's great. If it's not found - you have a problem and must install lynx. Depending on your system you may have to do:
sudo yum install lynx
sudo apt-get install lynx
etc.
Look for your linux flavour tutorials and which package managers they use.

Once you have lynx, issue this command:

`crontab -e` - this will edit the crontab at your user level, not root, which is safer and recommended practice. In there, you can specify paths, e.g. add this:

Code: Select all

SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
or just enter your cronjob command:

Code: Select all

*/5 * * * * /usr/bin/lynx --dump http://localhost/bnt/scheduler.php?swordfish=*password* > /dev/null
It's usually edited with vi editor by default, so to save, press ESC (to exit 'insert' mode) and then SHIFT + zz (SHIFT + zq is a shortcut to exit without saving)`, but it's easier to export your editor as nano, just as thekabal already wrote in this thread. Nano is much simpler and friendly.

That should have your cronjob saved.

Surfdude
Posts: 17
Joined: Wed Jan 25, 2017 02:09 UTC

Re: New Install

Post by Surfdude » Thu Feb 02, 2017 00:43 UTC

I am trying to use a cron job scheduler in a cpanel app. It keeps sending me an email saying that the line that you gave me and I have already been using is not a valid path. It keeps indicating that it can't see the file at the listed location.

I am more than happy to give somebody temporary access to my cpanel until I have resolution.

If you are interested in solving this problem let me know.

Thanks,

Ed

Surfdude
Posts: 17
Joined: Wed Jan 25, 2017 02:09 UTC

Re: New Install

Post by Surfdude » Thu Feb 02, 2017 00:58 UTC

New output for following line:
/usr/bin/curl --user-agent cPanel-Cron http://localhost/public_html/bnt/scheduler.php

% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed

0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 236 100 236 0 0 7729 0 --:--:-- --:--:-- --:--:-- 7866
<html><head><title>Error 404 - Not Found</title><head><body><h1>Error 404 - Not Found</h1><p>The document you are looking for may have been removed or re-named. Please contact the web site owner for further assistance.</p></body></html>

thekabal
Posts: 100
Joined: Sat Apr 19, 2014 22:32 UTC

Re: New Install

Post by thekabal » Thu Feb 02, 2017 02:22 UTC

It will help if you specify your web hosting company, so that we can look through their support pages to get more information about which distribution they use (which will help identify the paths and the commands they have available):

http://support.hostgator.com/articles/c ... ob-command

User avatar
TheMightyDude
Site Admin
Posts: 311
Joined: Thu Apr 17, 2014 09:15 UTC

Re: New Install

Post by TheMightyDude » Thu Feb 02, 2017 03:13 UTC

You also cannot use localhost, you have to use the full domain and path.
Basically localhost will fail because apache is set to link "bnt.surfdudeonline.com" and "www.bnt.surfdudeonline.com" to the bnt web folder where as localhost isn't, hence the file not found error.

I think "www.bnt.surfdudeonline.com" is just an alias that points to "bnt.surfdudeonline.com" or its web folder.

At least we know lynx is working, so its not that.

try this:
*/5 * * * * /usr/bin/lynx --dump http://bnt.surfdudeonline.com/scheduler ... =*password* > /dev/null 
or
*/5 * * * * /usr/bin/lynx --dump http://www.bnt.surfdudeonline.com/sched ... =*password* > /dev/null 
Does that work?

Also your calling your scheduler every 5 mins, you will need to set your ticks value in the config, else you will get an out of sync time to next update timer.
TheMightyDude::Blacknova Development.
Development Blog YouTube Dev Channel Twitter Twitch

Surfdude
Posts: 17
Joined: Wed Jan 25, 2017 02:09 UTC

Re: New Install

Post by Surfdude » Thu Feb 02, 2017 04:21 UTC

Thank-you for the help guys...the following is the company that I am using:

inmotionhosting.com

I am seeing somethings...for some reason it is opening the main.php now and I don't know why.

At the moment I am having the best results with the following:

/usr/bin/curl --user-agent cPanel-Cron http://biz215.inmotionhosting.com/~surf ... eduler.php?

This is part of the dump that I am getting:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed

0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- 0:00:02 --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- 0:00:03 --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- 0:00:04 --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- 0:00:05 --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- 0:00:06 --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- 0:00:07 --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- 0:00:08 --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- 0:00:09 --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- 0:00:10 --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- 0:00:11 --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- 0:00:12 --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- 0:00:13 --:--:-- 0
100 3344 0 3344 0 0 242 0 --:--:-- 0:00:13 --:--:-- 733
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">

thekabal
Posts: 100
Joined: Sat Apr 19, 2014 22:32 UTC

Re: New Install

Post by thekabal » Fri Feb 03, 2017 21:20 UTC

Looks like you are missing the ? swordfish=password at the end of your scheduler call.

What happens if you visit (in a web browser):

http://biz215.inmotionhosting.com/~surf ... eduler.php?swordfish=(yourpasswordhere)

Surfdude
Posts: 17
Joined: Wed Jan 25, 2017 02:09 UTC

Re: New Install

Post by Surfdude » Sat Feb 04, 2017 03:51 UTC

yep not missing that stuff...just didn't include here is all something about it actually being a password and all. Yes I can see the file. In fact I have a script running at the moment that is bumping the scheduler every 3 minutes...not a good fix (temp). Just saying I want to get the cron job working so I don't have to work it from my home computer continuously.

I think that I have gotten my cron job to work by using a command that wasn't supposed to work (wget -O - -q)

freaking weird.

Thank-you guys for all the attempted help. I will now tweek it and put my own flavor on it.
Last edited by Surfdude on Sat Feb 04, 2017 04:28 UTC, edited 1 time in total.

Post Reply