 | |  | | | Classifieds Installation & Upgrades If you're having install or upgrade problems, post here. |
April 27th, 2004, 09:01 AM
|
#1 (permalink)
| | PhotoPost Developer Verified Customer
Join Date: Jan 2002
Posts: 11,736
| Cron Job: sendnotice.php
One aspect of the installation which needs some expansion is the running of the sendnotice.php script.
sendnotice.php is the script which sends out auction notices to buyers and sellers, expires ads and sends out notices to users that their ads are about to expire (and gives them the option to renew them).
Under the old system, this script was run once a day; because of the addition of auction, we now recommend this script be run every 5-15 minutes to ensure timely delivery of notices to auction winners. If you do not plan to use auctions at all, you can continue to run this script once a day. WITH AUCTION, EVERY 10 MINUTES
If you have access to cron scripts (you may need to contact your host for this), we recommend a cron entry that will execute the script every 10 minutes:
*/10 * * * * /usr/bin/wget --spider http://www.viperalley.com/classifieds/sendnotice.php
The */10 tells cron to run this script every 10 minutes.
Windows users who do not have access to cron jobs will want to use the Task Scheduler to add an entry to run the script using the PHP.EXE executible, for example:
C:\PHP\PHP.EXE C:\INETSRV\WWWROOT\CLASSIFIEDS\SENDNOTICE.PHP WITHOUT AUCTIONS, ONCE A DAY
To accomplish running the task once a day, I've inserted a script called classifieds in my /etc/cron.daily directory which contains the line:
#!/bin/sh
/usr/bin/wget --spider http://www.viperalley.com/classifieds/sendnotice.php
You can also enter this cron job directory into your crontab file with the format:
30 0 * * * /usr/bin/wget --spider http://www.viperalley.com/classifieds/sendnotice.php
Which will execute the script at 12:30am each day.
Link for information about cron jobs: https://panel.dreamhost.com/kbase/index.cgi?area=2506
wget information: http://www.gnu.org/software/wget/wget.html
You can also execute the script manually by running the URL in your browser if need be, but this is very inefficent.
__________________ Please do not PM me for support or sales questions. Thank you for your understanding. |
| |
April 27th, 2004, 05:38 PM
|
#2 (permalink)
| | Senior Member Verified Customer
Join Date: Oct 2003 Location: Ottawa, Canada
Posts: 741
|
If all the print commands were commented out... is there a way to possibly use the VB3 cron to run sendnotice.php? I realize it's more a mod than anything else but I'm thinking with the number of people using the header-inc file on their site that this would be an easy way to manage it. If it's technically possible I could try to work it out and post it for others on photopostdev.
|
| |
April 27th, 2004, 05:51 PM
|
#3 (permalink)
| | PhotoPost Developer Verified Customer
Join Date: Jan 2002
Posts: 11,736
|
I'm not familiar with the vb3 cron.
__________________ Please do not PM me for support or sales questions. Thank you for your understanding. |
| |
April 27th, 2004, 06:07 PM
|
#4 (permalink)
| | Senior Member Verified Customer
Join Date: Oct 2003 Location: Ottawa, Canada
Posts: 741
|
Fair enough. If I can get it to work I'll post the details to PPdev.
|
| |
April 27th, 2004, 06:54 PM
|
#5 (permalink)
| | Senior Member Verified Customer
Join Date: Oct 2003 Location: Ottawa, Canada
Posts: 741
|
I've got it working manually Michael and will post the details on photopostdev as soon as it runs through a regular scheduled task. Very easy way for those with VB3 to set it up with only minor changes.
|
| |
May 10th, 2004, 06:39 PM
|
#6 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 52,658
|
The thing about cron jobs is that it varies by server. There is no way to put this in as part of the install. Now we can make a note on the last part of install to remind a user to set up the cron task if they choose etc.
|
| |
May 10th, 2004, 07:44 PM
|
#7 (permalink)
| | Senior Member Verified Customer
Join Date: Oct 2003 Location: Ottawa, Canada
Posts: 741
|
There's a cron job built into a standard VB3 install. It will not work unless there's at least one visitor to the site as it's tripped when the footer loads but for a site with no visitors a cron is hardly an issue in the first place.
I've been trying to get sendnotice to work with the VB3 cron but so far unsucessful. It will work great if I cleck "Run Now" but not for the timed activation. Still tinkering with it though....
|
| |
May 10th, 2004, 07:51 PM
|
#8 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 52,658
|
I suspect VB crons will only work for VB scripts
As far as your initial thread on our install needing expanding on the sendnotice.php cron job that what my reply was in regards to.
We can obviously easily remind a customer when finishing an install to set up the cron task if they want to use the feature but thats about all we can do. I am pretty well versed on cron tasks and they are very server dependent and vary. We can not set anything up for a customer upon install.
Most customers need to set up a cron task in cpanel or ensim if they have that which includes the nice graphical cron client. Yet others will need to SSH in and set this at server level as I do. Others still have no acess at all and will need to get a host to set up a cron task and not all hosts support cron tasks.
|
| |
May 11th, 2004, 03:10 AM
|
#9 (permalink)
| | Senior Member Verified Customer
Join Date: Oct 2003 Location: Ottawa, Canada
Posts: 741
|
Yep... I hear ya. I just wish there was another way to do it that's all.
As far as VB cron goes, I do believe it will support other scripts if done correctly as many mods are now using it. I feel I'm close to figuring it out but not really sure what I'm looking for making it twice as hard to find the answers. If I get it I'll certainly share for others it may be of interest to and if not... well, it'll keep me busy for a while I suppose. |
| |
May 11th, 2004, 06:43 AM
|
#10 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 52,658
|
look for the small snippet of code or function relative to all files in relation to the cron task. This will get you alot closer to making it work.
|
| |
July 1st, 2004, 04:19 PM
|
#11 (permalink)
| | Member Verified Customer
Join Date: Feb 2002
Posts: 247
| Quote: |
Originally Posted by Bryan Ex Yep... I hear ya. I just wish there was another way to do it that's all.
As far as VB cron goes, I do believe it will support other scripts if done correctly as many mods are now using it. I feel I'm close to figuring it out but not really sure what I'm looking for making it twice as hard to find the answers. If I get it I'll certainly share for others it may be of interest to and if not... well, it'll keep me busy for a while I suppose.  | Bryan, did you ever get this working?
|
| |
July 2nd, 2004, 01:52 PM
|
#12 (permalink)
| | Senior Member Verified Customer
Join Date: Oct 2003 Location: Ottawa, Canada
Posts: 741
|
Nope. It will work if I click on "Run now" but whenever the scheduled time comes up it just passes by without being executed. It's been a while since I've played with it so perhaps it's time to give it another try.
|
| |
September 15th, 2004, 04:36 PM
|
#13 (permalink)
| | Member
Join Date: Sep 2002
Posts: 189
|
Sendnotice.php does delete the expired ads. However, it leaves the count of the ads in the category file alone. Therefore the category totals are inflated. So, one needs to run the database scan that updates the count. I've determined that with admin access, the command that needs to be run is --> adm-db.php?counts=yes&okay=yes&ppaction=scandb <-- In addition to the sendnotice.php script.
However, neither the adm-db.php script nor the sendnotice.php script remove the related comments from the comments file. I believe this works properly in the straight photo (non-classified) application and that code needs to be inserted into the classifieds. The orphaned comments still display in the short list of comments on the main page.
Also, I know this was raised elsewhere, but I don't think it was addressed. What about the SOLD ads? They should be treated like expired ads as far as removing them from the files. They are not displayed after x amount of time, but the count of them and the record of them (and their comments) are still there.
|
| |
September 20th, 2004, 11:30 AM
|
#14 (permalink)
| | Registered User
Join Date: Apr 2004
Posts: 2
|
CavySpirit,
the "trick" to run the adm-db.php did not work for me, neither manual nor as cron, the ads counter remains unchanged, actually i have to correct it in the sql-db per hand, which sucks |
| |
September 27th, 2004, 03:55 AM
|
#15 (permalink)
| | Senior Member Verified Customer
Join Date: Oct 2003 Location: Ottawa, Canada
Posts: 741
|
If you are having trouble setting up a proper crontab to run sendnotice.php you can do so here for free; http://www.webcron.org/index.php?&la...3c65aa74944418
Set up a free registration and then just enter the complete URL to sendnotice.php in the "Tasks" section.
|
| |
December 1st, 2004, 09:45 AM
|
#16 (permalink)
| | PhotoPost Developer Verified Customer
Join Date: Jan 2002
Posts: 11,736
|
This info has been updated to reflect changes for Classifieds 2.0.
__________________ Please do not PM me for support or sales questions. Thank you for your understanding. |
| |
April 30th, 2005, 01:26 PM
|
#17 (permalink)
| | Member Verified Customer
Join Date: Apr 2005
Posts: 34
| Expired Auction Users Get Notices Every 10 Minutes
We are a new installation. We installed 2.11 and followed the instructions above with the sendnotice.php cron job running every 10 minutes. We've had everything running relatively smoothly for the past week and now have over 500 ads inthe system.
Unfortunately, users who make their items biddable are now complaining that they get end of auction notices every 10 minutes.
The only way I can stop the email deluge for them is to change the flag on the product in the database to not be a biddable.
I presume there is some type of bug in the sendnotice.php script that doesn't know the notice has already been sent once?
Suggestions?
|
| |
April 30th, 2005, 02:00 PM
|
#18 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 52,658
|
Are you running with the -spider option in the cron task
try to remove the "--spider" or replace it with "-q" (for quiet). I think the spider tag may cause the script to not execute properly on some systems.
|
| |
May 16th, 2005, 01:19 AM
|
#19 (permalink)
| | Member Verified Customer
Join Date: Oct 2004 Location: Virginia
Posts: 125
|
Just wanting to see if I am on the right track here....
I am running Threads v6.5.1.1 and running Classifieds v2.3. I have access to my WebHost Manager as well as my cPanel.
I followed the same cron path style as I had in there before from a previous cron tab I set up with Threads.
Here is what I have set up:
*/10 * * * * /usr/bin/php /home/smoknz28/public_html/ubbthreads/classfieds/sendnotic.php
Running the cron task as I have it above sends back a confirmation email to me every time it runs (I only have it set this way for testing purposes) with the following:
Status: 404
Content-type: text/html
X-Powered-By: PHP/4.3.10
No input file specified.
=================================================
Should my cron task look more like the one that was posted initially on this thread:
*/10 * * * * /usr/bin/wget --spider http://www.f-bodyhideout.com/ubbthre...sendnotice.php
Last edited by smokn28; May 16th, 2005 at 01:43 AM.
Reason: Update
|
| |
May 16th, 2005, 06:29 AM
|
#20 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 52,658
|
Nah that should work if you had an issue and needed to use spider
|
| | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Thread Tools | | | | Display Modes | Rate This Thread | Linear Mode | |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | All times are GMT -5. The time now is 06:02 AM. | |