473,804 Members | 3,228 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Automated tasks

Hi,

I have an auction site running. Now I want the auction to be able to
automatically send a mail msg to the seller after it expires. How do I do
it? Obviously there is some sort of way that I can employ so that this task
does not require an operator (such as me) to run manually. This task will
involve accessing the database and sending an email. Can somebody enlighten
me on this?

==James==
Jul 17 '05 #1
4 2557
You could run a PHP script from a cron task and verify if there are
mails to be sent. It wouldn't be sent at the exact second but I do think
it's the best solution. You could include a verification in your scripts
but running that every load is quite useless and takes CPU time off
your server.

L'Angel Admirable wrote:
Hi,

I have an auction site running. Now I want the auction to be able to
automatically send a mail msg to the seller after it expires. How do I do
it? Obviously there is some sort of way that I can employ so that this task
does not require an operator (such as me) to run manually. This task will
involve accessing the database and sending an email. Can somebody enlighten
me on this?

==James==


Jul 17 '05 #2

"L'Angel Admirable" <ja*******@para dise.net.nz> wrote in message
news:9e******** **********@news 02.tsnz.net...
Hi,

I have an auction site running. Now I want the auction to be able to
automatically send a mail msg to the seller after it expires. How do I do
it? Obviously there is some sort of way that I can employ so that this task does not require an operator (such as me) to run manually. This task will
involve accessing the database and sending an email. Can somebody enlighten me on this?

==James==


PHP does not have a job scheduler so the short answer is no, you can't do
this reliably using PHP alone.

The long answer is that you could have an external schedular, like
Unix/Linux cron that could call and activate your script... Alternativly,
you could have some check that when ever anyone visits your site, it checks
cloesd auctions and creates the mailers... but this would mean that the
email activity would only be acivated (unknowingly) by a visitor - thus a
server with a period of inactivity would not send the mailers... It really
wouldn't be reliable and could give mixed if implemented badly (ie two folk
visiting at the same time initiating two checks on the same auctions
resulting in two or more emails being sent out with the same notification
messages contained - or a timeout occuring before the scripts have properly
completed).

Your best bet would be an external schedular, like cron.
Jul 17 '05 #3
Thanks.. Randell, I am just wondering where do the cron configuration files
reside on a redhat system, so that I can schedule some sort of tasks?

==James==

"Randell D." <yo************ **************@ yahoo.com> wrote in message
news:cf%ob.2546 15$9l5.132086@p d7tw2no...

"L'Angel Admirable" <ja*******@para dise.net.nz> wrote in message
news:9e******** **********@news 02.tsnz.net...
Hi,

I have an auction site running. Now I want the auction to be able to
automatically send a mail msg to the seller after it expires. How do I do it? Obviously there is some sort of way that I can employ so that this task
does not require an operator (such as me) to run manually. This task will involve accessing the database and sending an email. Can somebody

enlighten
me on this?

==James==


PHP does not have a job scheduler so the short answer is no, you can't do
this reliably using PHP alone.

The long answer is that you could have an external schedular, like
Unix/Linux cron that could call and activate your script... Alternativly,
you could have some check that when ever anyone visits your site, it

checks cloesd auctions and creates the mailers... but this would mean that the
email activity would only be acivated (unknowingly) by a visitor - thus a
server with a period of inactivity would not send the mailers... It really
wouldn't be reliable and could give mixed if implemented badly (ie two folk visiting at the same time initiating two checks on the same auctions
resulting in two or more emails being sent out with the same notification
messages contained - or a timeout occuring before the scripts have properly completed).

Your best bet would be an external schedular, like cron.

Jul 17 '05 #4
On Mon, 03 Nov 2003 03:28:32 GMT, "Randell D."
<yo************ **************@ yahoo.com> wrote:
$ man 5 cron

or

$ man 5 crontab

To understand the layout - however, if you have a rough idea on cron, then
do

# crontab -e

This will edit your existing crontab setup - Note, if you are not a root
user, you must have root privilages (there is a file called cron.allow that
would have usernames listed of those who do have cron access - secondly,
becareful on how you write your scripts because they will be executed with
'root' access - You could easily write a script to remove every file on the
system... so check and double check your code).


Not sure about how Redhat sets this up, but it's quite normal for normal users
to have cron access. Their jobs do NOT get run as root - that'd be a nightmare!
They get run as the owner of the crontab entry.

--
Andy Hassall (an**@andyh.co. uk) icq(5747695) (http://www.andyh.co.uk)
Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space)
Jul 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
8757
by: Konstantin Zakharenko | last post by:
Hello, Our QA team have running a lot of test scripts (for automated regression testing), they run them on the different databases (Oracle/MS SQL). Several of those tests are dependent on the current date/time. In order to be able to use them efficiently, we changed the current date/time on the QA database server to a specific date/time before starting the scripts, so we are sure the test scripts always run in the same environment.
3
1723
by: braders00 | last post by:
Dear All, I would like to run a script on a daily basis that queries a DATE field in one of my tables. I want to do this to establish the age of my table entry by comparing with the current date. Could someone please give me a few pointers on how to get started in solving this. I just read somewhere about cron jobs but I've never used them?
4
3230
by: Civilian_Target | last post by:
Is there any way in DB2 to automate the taking of a snapshot, for example, a function that will cause a db2 snapshot to be taken every 5 minutes and written to a uniquely named file? Am I better off attempting to do this with my poor knowledge of dos batch files? I'm running UDB 8.2 on Windows 2000. Thanks.
4
4874
by: MLH | last post by:
I would like to configure OutLook Express so that it does not attempt to resend eMails in the Outbox folder whenever new sends are made From Access. The ISP's server rejects some eMail address immediately... Things like JohnDoe@aol. (an incomplete address) and sometimes NonExistent@NorthState.net (if NorthState is my ISP, its mail server knows IMMEDIATELY that NonExistent is NOT a valid mailbox in their system.
0
847
by: Walter W | last post by:
hi, in my company, we have to create many web forms which are more or less just repeated process of 1. create CRUD stored proc for each entity 2. create CRUD methods in data access layer for each entity 3. build web forms for each entity (textbox, checkbox, grid, etc) 4. collect data from the web form and call data access layer methods. what's the best way to reduce of the amount of repeated coding in this case?
0
1819
by: innovasys | last post by:
TORQUAY, DEVON, UK - Innovasys announced the release of Document! X 5, the fifth version of the documentation solution of choice for developers using Microsoft Visual Studio or the .NET Framework. Document! X 5 automatically produces professional quality technical documentation and on-line help for Microsoft .NET Framework assemblies (.NET Framework 1.0, 1.1 and 2.0 are all supported), COM components and controls, Visual Basic source code,...
6
2224
by: bmjnine | last post by:
Hi all, I am trying to setup a daily task in my .NET (1.1) application. The application is a project management tool, and the daily task I am trying to set up will check for overdue project deadlines, and send out email reminders. I have setup all the logic that checks deadlines & sends the emails, and that works great. However, automating it has been a problem.
1
1604
by: =?Utf-8?B?UmljaGFyZCBCaXJk?= | last post by:
Hello, I have an issue with the recent Windows Automated Update disabling my ATI All-In-Wonder video capture card in Windows XP. Then when I reload the ATI software, the card works until the next Automated Udate disables it again. I have temporarily deactivated the Automated Update feature due to this problem. After the update, I get the error message: ------------------------------------------------------------------- "The TV player...
9
1839
by: hgrecco | last post by:
Hello, I am working on a program that must perform a certain task on numeric data stored in a file. The task is given by user input from a list of possible tasks. The file has some particular format and I have already a loop that is able to read sequentially data from the file. The question is how to operate with the data inside the loop in an efficient way. The straight forward way (which I did) is creating as many functions as tasks...
0
9588
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10589
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10340
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10085
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7625
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6857
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5663
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4302
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2999
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.