View Full Version : cronjob
Cartman
10-18-2002, 03:03 PM
Helen, Fred,
I wonder if your tech person could explain to me how the cronjob works in the cpanel.
I put in, the command I believed to be needed, to run the cronjob (i.e., sending out the end of auction announcements, emails, etc.) and it won't run automatically at a prescribed time.
I don't know how the command needs to be configured and if there are any other files or coding that needs to be added to the auction program somewhere to make this work.
I can run the function manually by typing in http://collectingsouthpark.com/auction/chron.php, but need to know how I can set this up so that it will run automatically at the prescribed time that I set in the cronjob.
I'm going away next week and things are gonna just sit on the site for a week and nobody is going to be alerted about ending auctions, if I can't get this fixed.
I've heard nothing from the techs at phpAuction and to tell you the truth, I think your tech would probably know more about how to set this up in the cronjob on the cpanel than they would.
Thanks a bunch! :)
ON EDIT: Mary Lacey from phpAuction sent me what she believes the command should be. She said:
"If this does not work, you may want to contact your host provider and ask them what is the correct command to call the cron.php script located in your main phpauction directory.
Each server can be configured differently, they should know how to call the command that you need."
Helen
10-18-2002, 07:03 PM
Karen, I'm not sure I understand the question. What did she say was the command to call the cron.php script ?
Is that the same question that I asked him about? If it is, I doubt that he would have a different answer. If not, I need to be sure exactly what I'm asking. :D
Cartman
10-18-2002, 09:19 PM
Hi Helen,
Mary L. told me to put in the command:
PHP /home/csp/public_html/auction/cron.php
I have that in and a test auction to end at 12 midnight tonight to check it. She thinks that should work.
Before, I had just the path without the PHP and it didn't work.
She said that if it still didn't work and because many servers are set up differently, that the tech should be able to tell me what command I would have to use in the cronjob in order to call up the cron.php file on my server.
I didn't realize that what you suggested above is what the tech suggested. I thought that we were all just taking guesses. Sorry!
I would think that the above would do it because that's the absolute path to the file. I just can't get it to work. I thought maybe there's some magic words you have to put in front of the path like "abra cadabra" or or "execute d*** you!" LOL! I'm getting a little punch drunk. Can you tell?
Hopefully, the "PHP" preceding the path is what was needed (you know ... like eliminately two line spaces in that file to get the errors to go away.) That one still gets me!
It's just that if it doesn't do it automatically next week. Any auctions that end will be just sitting there and no one will be notified if they won or not, since I won't be here to physically type in the command. I'm trying to get it so that it will do it automatically, as it should so it doesn't need me to function.
Helen
10-18-2002, 09:59 PM
Actually, Mary is the PHP script expert around here and her hosting service uses CPanel too. It would seem to me, that if the command lazzchatcircuit gave didn't work, and the absolute path Mary gave didn't work, that it is something to do with/or to be done in... the auction script itself, not a server or CPanel thing.
All the CPanel does is provide an easier way to set up a cron job, but I don't think it gets as detailed as you seem to need for that particular script cron job. As you say, I would bet that something needs to be added to the script to make it perform as you need it to do.
Mary, what are your thoughts on this?
I don't want to seem reluctant to help... I just don't know how. Lazzchatcircuit has the flu right now, but even if he didn't, he has only offered to help us with server related things. So if it is a script problem, I really hate to keep asking him, as I know he has not actually done the aution script... it is as new to him as it is to us. Please understand that he has a huge business to manage, and we don't want to "wear out our welcome" for his time, for when we do have server related issues to solve.
Cartman
10-18-2002, 10:12 PM
Hi Helen,
I just went into the manual for the cpanel and looked at the info they had there for setting up the cronjob.
They give an example of a command and it seemed a bit more than just putting in a path to the file. It looked more like that first one that the techs at phpauction said to use if PHP was installed as a module
-dump/dev/null http://www.mydomain.com/auction/cron.php
Kinda makes sense ... I would assume that a COMMAND is not just giving them a location for the file, but also telling it to DO something with the file.
Correct me, if I'm wrong, Mary.
Of course, I have no idea what -dump/dev/null means.
Helen
10-18-2002, 11:16 PM
I just looked at the CPanel docs. It does not give much detail, but it does have this link for more information:
(Everything seems to link to more information, and the more I look at the linked pages, the more confused I get. :) But it should make sense to someone who knows PHP )
http://www.redhat.com/support/resources/tips/cron/cron.html
This page seems to be an extension of the CPanel Docs and gives a link to the following page for more information (I saw the word "dump" in the following links somewhere, which I think is what we're after.):
http://kb.indiana.edu/data/afiz.html
This looks like the cron tab file needs to be edited (or created if one doesn't exist) to make it do specific things repeatedly as a particular script needs it to do. (I don't see a file in your File manager with a similar name that they suggest, but i'm not sure where to look for it.)
At any rate, at the bottom of that page is a link to ask a consultant if the page has not answered the question at hand.
-----------------
Another possibility: You have probably already seen this, but there is a fine in your CPanel File manager named cron (public_html/auction/docs/cron )
This file links here for information on Cron.php execution and says "phpauction needs cron.php to run regularly to check expired auctions and close them updating the database and sending e-mails to sellers and winners." :
http://uwsg.iu.edu/usail/automation/cron.html
I know this is frustrating. Somewhere there is an answer... I just don't think I would recognize it when I see it... you or Mary probably will though. :?: :)
fuhgedaboutit
10-19-2002, 05:24 AM
Fiiiinally I get to help with an answer. (Helen you gotta recognize at least 1 or 2.)
Try one of these: (At your own risk of course) :crazy:
Be Bop A Lula
Ickey Hickey Parlay Vou
Yabba Dabba Do
Try kissing a frog :frog:
Salami Salami Bologna (This is from my Italian Grandmother, but she said you'd have to know how to give the "Evil Eye" and that eating a few cloves of garlic wouldn't hurt.) :shocked:
If all else fails, you can always sacrifice the above 3 smilies. (I'm not sure if they have to be virgins. Ask the guys.)
Let us know how it goes.
________
Body science (http://bodyscience.ws/)
Cartman
10-19-2002, 04:27 PM
Hey Dusty,
Girl ... you are too much!!!! I LAUGHED SO HARD!!! Needed that!
And, I'll take that $3,000+ in small, "unmarked" monopoly bills, please! Of course, I have to tell you ... one of these TEST. NO SALES will run ya over $10,000 on the open market! You got a REAL DEAL here! :cool:
Well, time to pack up the truck and move (eh, quickly!) :arrow:
Seriously, tho ... thanks for testing the bidding functions out for me. I tried to do that yesterday. Thought ... yeh, I get all the seller functions working great ... what if someone can't make a bid? But, when I tried to test it, it said I couldn't bid because it was my auction. So, I'm glad you "just got your bid in"
The unfortunate thing is still that the cronjob command didn't work. I had to clear it out manually. I can't imagine what you have to do there. Back to the tech again, I guess.
Undaunted ... she trudges on ... to a new day of "GUESSING!" Arrrrgh! :D
Cartman
10-19-2002, 05:27 PM
Mary Lacey, the tech, just gave me some pretty detailed instructions on how to make the cron.php execute whenever someone accesses the index page of the auction.
She said since we haven't been successful in coming up with the proper command from the cronjob, this would work. Basically, what it does is it tells the computer the execute the cron.php whenever someone accesses the index page of the auction. Judging by my user reports, lots of folks call up the auction ... if for no other reason ... to check it out. So, that would probably work well.
If it does ... with another TEST ... NO SALE. (Yes, Dusty I have two for sale! :lol: ) I'll post the instructions she gave me here.
And, if I can sell another of these TEST ... NO SALE pieces of jun.... (eh, pricely objects d'art) to another unsuspecting dup .... (eh, connessieur of fine art) I'll take the money and ru .... (eh, close up shop and retire! ;)
Shane
10-19-2002, 05:44 PM
Hi Karen,
Still following your 'cronjob' drama here, can't help much but if you need a test bid or two ala Dusty, just shout.....good luck
Cartman
10-19-2002, 06:34 PM
Hi Shane,
I'm finding that some of this stuff -- although simple in concept -- is not simple to accomplish. But, we keep plugging away!
btw -- Dusty, I left you feedback on your transaction. Gave me the opportunity see how that worked too! You, of course, being praised for your "fast payment" and just being the wonderful person that you are! :roll: btw ... I expect feedback in kind from you!!!! :shock:
I think this new bit of script that works from the index page will do it. But, you'd think that with all of the information on the Internet, someone would just lay out the command for simply calling up a file from one's server. Something simple like GET or RUN or FETCH or SOMETHING!!!! Oh well...
Another day, another crisis. Get over it!
Helen
10-19-2002, 07:11 PM
:biglaugh: Dusty!
Yeah, I remember more of those than I care to admit!
Karen it does look like the cron.php is the one that "gives the orders" and is the "warden" patroling the "detainees" (crontabs, which are the users). :)
So if editing needs to be done, it sounds like it would be with the "warden's" (cron.php) "order repertory" to allow or deny certain actions....
and the "bugler" (command) has to wake up the "warden" (cron.php) and send him to work... since he's on "24 hour call".
-----------------------
Well, maybe the orders are already in the auction's cron.php (no editing necessary?) to make things happen automatically, according to your latest reply from support. It sounds like all you need to do is use the "no doze" (right command) to make the cron.php "stay awake".... :confused:
Not sure I would understand it, but I'd like to see what they sent to you anyway. :)
BTW... moving? I was thinking you had already moved. That's a big job, but usually a fun thing, so enjoy! That's not something most of us do very often, and it usually clears out a lot of "unused treasures" collecting dust. Hope everything goes smoothly for you! :shock:
Cartman
10-19-2002, 07:58 PM
bugler? warden? detainees?
Now you've REALLY got me confused!!!!! And, at this point ... it doesn't take much! :shock:
I'm not moving until summer, 2003. Ken and I are going to Ohio next week to take care of some "house" things on that end. We're lucky. We get to clean out the house we're moving from AND the house we're moving to!!!! Fun, Fun Fun!!!! Actually, it is.
The funniest part is that most of the stuff that we have to get rid of is not even our stuff!!! We have to clean this house of all of my Mom and Dad's stuff and clean the other house of all his parent's stuff. Our stuff is in storage!!!!
This trip will be to decide what furiture of his folks we want to keep and arrange to have the rest picked up. And, do some sizing of rooms and whatnot for our stuff. And, even do a bit of sightseeing. They have loads of museums and such in the new, redeveloped City of Cleveland. It's like mini NYC!!!!
And, according to all of the weather reports ... we're hitting the peak for the fall colors and all, so LOTS OF PICS!!! May have to have you upload that photo thingie for me, when we get back!!! Although, after this auction thing ... I think I'd like to rest for a while! :lol:
Cartman
10-19-2002, 10:16 PM
In order to have the cron.php run automatically each time a visitor accesses the index page of the auction:
In the index.php file: Put the following code:
include_once "cron.php";
Put this statement just below the lines for includes at the top of the file.
In the cron.php file, you need to remove the following three lines at the top of the file:
include("./includes/config.inc.php");
include("./includes/messages.inc.php");
include("./includes/auction_types.inc.php");
Once this is done ... you're good to go.
Mary B.
10-20-2002, 09:42 AM
dump/dev/null is a directory path on the server (three folders, named dump, dev, and null)
Kinda makes sense ... I would assume that a COMMAND is not just giving them a location for the file, but also telling it to DO something with the file.
Absolutely correct. The cron job command tells the server two things: execute the script, and where the script is. The time details in the other part of the cron job simply tell the server when to execute the named script.
As for the correct path to use, Vic should be able to tell you that. Server paths vary, and the paths may be different on my server than they are on Fred and Helen's.
One thing I would caution against is running the cron every time the auction index is accessed. This has the potential to put undue load on the server, and can, if the file is accessed often enough, crash the server.
Helen
10-20-2002, 02:30 PM
:shock: Well, we don't need any server crashing going on, that's for sure.
So I guess the path you put in the CPanel cron job box is dump/dev/null/collectingsouthpark.com/auction/cron.php in that case.
When I asked him about it, I quoted the Linux instructions, which included the dump/dev/null/ part. So I guess he just assumed I knew that was the first part and he completed it by telling me that it is collectingsouthpark.com/auction/cron.php I'm sure he knew what he was talking about and I just did not understand as he thought I did. :oops:
Could you give that a try Karen, if you haven't yet? Maybe it won't be necessary to delete those 3 lines if the CPanel cron job box command is correct :?:
fuhgedaboutit
10-22-2002, 05:27 AM
I'm so glad that you accepted my money. I'm going broke trying to keep Shane in the style he's accustomed to. I think we'll both need attorneys. One for you if you take the money and run and one for me to get a divorce, lol. Are you sure you're going to Ohio, and not the Bahamas? And with Ken and not Giano? Got to stop these rumors.
I got an email announcement about winning. I don't understand much of this so I'll send it to you in case you need to see it. Also I couldn't find my bid so I could read your response. I'm going to go look again.
http://www.fuhgedaboutit.com/itwasntme.gif
________
BABE FUCKING (http://www.fucktube.com/categories/184/fucking/videos/1)
Shane
10-22-2002, 06:54 AM
..Divorce...already :shocked: :shocked: :shocked:
fuhgedaboutit
10-23-2002, 05:30 AM
uh, sure Shane you say that now....Talk to me tomorrow :shock:
________
OUTDOOR VOYEUR (http://www.fucktube.com/categories/814/voyeur/videos/1)
Cartman
10-26-2002, 02:12 AM
Hey Dusty,
LOL ... that notice you got was just SOP at the end of the action, since you bid on it.
Helen, I'll try that cronjob command again, but to add insult to the already accumulated injury. It appears that one part of the auction works REALLY WELL. Apparently, when the cron job runs it sends an email to you telling you if there were errors. Well, I checked in my Neomail email and I had 900+ emails telling me that the chron job did not run because the command was incorrect.
Apparently, when I was playing with all of the settings (numerous times) I must have set it up to run like every five minutes or something. So, I got an error message every five minutes!!!!!
Well, I figured I'd let them go, since you were going to take the Neomail off anyway. Well ... since you had already set up my account with the same name and all on the new email ... the same 900+ emails are there too! Now, I have to go in and delete the all!!!!
btw ... I just got back from Ohio and checked my normal email. My auctions that I had listed ended and the command within the index page works.
Mary Lacey said that to put it in the index page was OK for auctions where there weren't alot of visitors. Since I get very little traffice (thus far), I don't feel that it will cause any server problems. But, I'll set it up again the other way tomorrow with the cronjob command see if it works.
One good thing, though ... Someone actually bid on one of my auctions and won!!!!
Also, somebody just contacted me and wants me to do some kind of South Park promotion with them for the new eps starting in November. I didn't read it all, but just the fact that someone wants to collaborate with my site for something is cool! I'll let you know what it's all about, when I figure it out.
:party:
That is really cool beans, Karen!
Helen
10-26-2002, 03:11 AM
That's great news Karen, congratulations on your sale and upcoming promotion! :cool:
Ok here's some more good news... don't make the changes I suggested. If it is working well, let's just let it ride since you aren't busy yet and we will watch the resources.
But one word of caution... be sure to keep your site backed up just for good measure.
We did not do anything with your mail or make any new mailboxes... it is an automatic thing. Maybe Fred knows a fast way to dump those unwanted emails for you. Just save what you want to keep and start using Horde from now on.
Hope you had a chance to take LOTS of pictures. :)
Cartman
10-26-2002, 03:33 AM
Hi Helen,
Thanks!!!
The unwanted emails are deleted. I just set the options to display 100 at a time and got rid of them fast. I can see what Mary B. is talking about, though....if that had kept on going, it would have really jammed up by email.
Yeh, I'm going to leave it as is. It works and I have at least one person checking it out a day to run it. I don't have the traffic to really worry about it yet.
No pics, I'm afraid. Besides the fact that we ended up working at the house for the whole week, it was raining and overcast. But, the drive back and forth was beautiful. All the fall leaves are changing. But, taking photos from the car wouldn't have produced much.
fuhgedaboutit
10-27-2002, 08:04 AM
CONGRATULATIONS! How cool!
hmmm let's see...what should Karen dress up as for Halloween? :confused: It's coming to me...I've got it :idea: ...How about a...
CRON? :shocked:
We will definitley need pictures!
We missed you.
________
Male advice forums (http://www.love-help.org/male-advice/)
Cartman
10-27-2002, 02:28 PM
Speaking of Halloween ...
The South Park Studios site is having their annual Halloween costume contest. You have to take a pic of your favorite character and give them a costume that is original and fits their personality. I wanted to do a tie-in with Monsters, Inc. (I just got the video and LOVE IT!), but the main characters are too loveable, so I did Cartman as Roz, the nasty slug of an accountant at Monsters, Inc. Now, if you're not familiar with the movie, you won't know who Roz is, but I've attached my entry anyway so you can see.
Now, don't be too harsh. You have to take a little Cartman graphic and completely do all of the costumes and everything freehand. I did mine in Paintshop Elements and Photopaint. It was kinda fun. It's not a "cron", Dusty. But, it's close! :lol:
http://collectingsouthpark.com/images3/CartmanRoz.jpg
fuhgedaboutit
10-30-2002, 05:29 AM
Now that's scary! :shock:
________
Vapezilla vaporizer. (http://www.vaporshop.com)
vBulletin v3.5.3, Copyright ©2000-2012, Jelsoft Enterprises Ltd.