Yup, it seems that you haven't had an update for about 284 mins.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?
New Install
- TheMightyDude
- Site Admin
- Posts: 311
- Joined: Thu Apr 17, 2014 09:15 UTC
Re: New Install
Re: New Install
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
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
Re: New Install
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:
or just enter your cronjob command:
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.
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
Code: Select all
*/5 * * * * /usr/bin/lynx --dump http://localhost/bnt/scheduler.php?swordfish=*password* > /dev/null
That should have your cronjob saved.
Re: New Install
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
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
Re: New Install
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>
/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>
Re: New Install
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
http://support.hostgator.com/articles/c ... ob-command
- TheMightyDude
- Site Admin
- Posts: 311
- Joined: Thu Apr 17, 2014 09:15 UTC
Re: New Install
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:
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.
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:
or*/5 * * * * /usr/bin/lynx --dump http://bnt.surfdudeonline.com/scheduler ... =*password* > /dev/null
Does that work?*/5 * * * * /usr/bin/lynx --dump http://www.bnt.surfdudeonline.com/sched ... =*password* > /dev/null
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.
Re: New Install
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">
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">
Re: New Install
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)
What happens if you visit (in a web browser):
http://biz215.inmotionhosting.com/~surf ... eduler.php?swordfish=(yourpasswordhere)
Re: New Install
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.
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.