![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
HOMICIDAL TROLL KILLER
Industry Role:
Join Date: Dec 2004
Location: Sunnybrook Institution for the Criminally Insane
Posts: 20,419
|
Cronjob help please
0,30 * * * * /var/www/virtual/domain.com/htdocs/catcher
thatsd what i have. not working. catcher is a script that i want to run every 30 minutes. i chmod the script to 755 already... can anyone help... #!/bin/sh #start cd /var/www/virtual/domain.com/htdocs wget http://www.domain.net/master.txt cat /var/www/virtual/domain.com/htdocs/master.txt >> /var/www/virtual/domain.com/htdocs/mastercomp.txt #end thats the script i need to run. basically it pulls a .txt from a location and appends the mastercomp.txt any help appreciated.... |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
HOMICIDAL TROLL KILLER
Industry Role:
Join Date: Dec 2004
Location: Sunnybrook Institution for the Criminally Insane
Posts: 20,419
|
bump init.d....
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
HOMICIDAL TROLL KILLER
Industry Role:
Join Date: Dec 2004
Location: Sunnybrook Institution for the Criminally Insane
Posts: 20,419
|
bump sudo su -.....
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
HOMICIDAL TROLL KILLER
Industry Role:
Join Date: Dec 2004
Location: Sunnybrook Institution for the Criminally Insane
Posts: 20,419
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
HOMICIDAL TROLL KILLER
Industry Role:
Join Date: Dec 2004
Location: Sunnybrook Institution for the Criminally Insane
Posts: 20,419
|
one last bump...
![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Registered User
Industry Role:
Join Date: Mar 2006
Location: North Pole
Posts: 82
|
what do your cron logfiles say? check /var/log/cron (or similar location on your system). this will tell you whether it is a problem with the script itself, or what.
does the script run and work correctly when you run it by hand?
__________________
rRhino.com ...social networking for book fans... |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
HOMICIDAL TROLL KILLER
Industry Role:
Join Date: Dec 2004
Location: Sunnybrook Institution for the Criminally Insane
Posts: 20,419
|
./catcher: /bin/sh^M: bad interpreter: No such file or directory
thats what i just got when i tried to run it manuelly.... |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 |
Registered User
Join Date: Jan 2006
Posts: 6
|
Mostly a lurker, but figured id help.
30 * * * * /path/whateveryouwanttorun Will run that script every 30 minutes. Remove that 0, you have. Goes min, hour, day of month, month, day of week. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
Registered User
Industry Role:
Join Date: Mar 2006
Location: North Pole
Posts: 82
|
If i'm not mistaken, the 30 alone means it will run at :30 of every hour, day, etc. His intention seems originally to run it every half hour, meaning at :00 and :30.
also, the message "bad interpreter: No such file or directory" in this situation usually means you don't have that shell installed. Try putting /bin/bash instead and see if it runs manually then. Some systems just don't have the original Bourne shell installed anymore.
__________________
rRhino.com ...social networking for book fans... |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 |
Registered User
Join Date: Jan 2006
Posts: 6
|
Sorry, hes right. take 4:30am advice for what it is. Your original cron will run every 30 minutes.
problem is just your shell.. see if its even there, most likely just linked to bash. swap or fix, should be fine then. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#11 | |
HOMICIDAL TROLL KILLER
Industry Role:
Join Date: Dec 2004
Location: Sunnybrook Institution for the Criminally Insane
Posts: 20,419
|
Quote:
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#12 |
HOMICIDAL TROLL KILLER
Industry Role:
Join Date: Dec 2004
Location: Sunnybrook Institution for the Criminally Insane
Posts: 20,419
|
/bash is in /bin and /sh is linked to /bash....
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#13 |
HOMICIDAL TROLL KILLER
Industry Role:
Join Date: Dec 2004
Location: Sunnybrook Institution for the Criminally Insane
Posts: 20,419
|
is it possible that i need to drop the script in cgi-bin or outside of htdocs?
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#14 |
Registered User
Industry Role:
Join Date: Mar 2006
Location: North Pole
Posts: 82
|
the first line in the script is often called the "bang line", and it points to the shell used to execute the script. if the two shell location paths you have tried so far (/bin/sh and /bin/bash) don't work, you need to determine which shells are available to be used, and where they are located on your system.
check other existing working scripts on the same system to determine the shell they are using, and then try using the same shell and location in your script here.
__________________
rRhino.com ...social networking for book fans... |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#15 |
HOMICIDAL TROLL KILLER
Industry Role:
Join Date: Dec 2004
Location: Sunnybrook Institution for the Criminally Insane
Posts: 20,419
|
thanks for all your help guys.. it was the script. i uploaded it from my box and it was seeing it incorrectly. i manually added the script through vi and its working now...
![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#16 |
making it rain
Industry Role:
Join Date: Oct 2003
Location: seattle
Posts: 22,114
|
An easy fix would be to change your cron line to this:
0,30 * * * * sh /var/www/virtual/domain.com/htdocs/catcher |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#17 |
making it rain
Industry Role:
Join Date: Oct 2003
Location: seattle
Posts: 22,114
|
Ah, so the real problem was probably hidden line break characters then... What are you using to edit files?
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#18 | |
HOMICIDAL TROLL KILLER
Industry Role:
Join Date: Dec 2004
Location: Sunnybrook Institution for the Criminally Insane
Posts: 20,419
|
Quote:
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#19 |
So Fucking Banned
Join Date: Oct 2003
Location: icq: 121189
Posts: 18,889
|
I could help you but I won't.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#20 | |
Confirmed User
Join Date: Oct 2005
Location: Charlotte, NC
Posts: 908
|
Quote:
Textpad will save the files in windows format wich uses ^M for carriage returns. Since linux/unix doesnt recognize ^M as a carriage return it will give you problems. Most linux distros usually come with two handy little tools for this situation.. remember these ![]() dos2unix unix2dos
__________________
ICQ: 284903372 |
|
![]() |
![]() ![]() ![]() ![]() ![]() |