niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » Programming » PHP
PHP to edit files
Post new topic   Reply to topic Page 1 of 1 [5 Posts] View previous topic :: View next topic
Author Message
Coyoteboy
*nix forums beginner


Joined: 09 Mar 2006
Posts: 9

PostPosted: Tue Jul 18, 2006 2:07 pm    Post subject: PHP to edit files Reply with quote

I'm looking at creating a website that basically saves times and dates
and emails specific people (all taken from a mysql database) when times
have passed. I suppose something like a birthday reminder site, but not
quite.

All I'd like to know is: Is this possible and how much of an
undertaking is it to get the emails out at specific times, instead of
run as a batch at fixed times from a linux cron script.

Cheers
J
Back to top
Rik
*nix forums Guru Wannabe


Joined: 16 Nov 2005
Posts: 291

PostPosted: Tue Jul 18, 2006 2:47 pm    Post subject: Re: PHP to edit files Reply with quote

coyoteboyuk@hotmail.com wrote:
Quote:
I'm looking at creating a website that basically saves times and dates
and emails specific people (all taken from a mysql database) when
times have passed. I suppose something like a birthday reminder site,
but not quite.
All I'd like to know is: Is this possible

Very possible, not even that complicated.

Quote:
and how much of an
undertaking is it to get the emails out at specific times, instead of
run as a batch at fixed times from a linux cron script.

At specific times: hardly doable with PHP. Something has to trigger the
script. With the proper access, you might schedule loads and loads of
different cronjobs at specific times, but that's hardly a workable solution.

As it's about email, the "specific" time doesn't really matter though, you
can't predict how long an e-mail will take to arrive.

I'd just schedule a cronjob every 15 minutes or so, that queries the
database for tasks to perform. That should do it. If cronjobs aren't
possible, you could trigger it on site visits. If you've got a popular page,
you don't want to trigger it verey time. Add a possibility you will trigger
the script. Possibility = 1 / (average visitors per interval)

Grtz,
--
Rik Wasmus
Back to top
Coyoteboy
*nix forums beginner


Joined: 09 Mar 2006
Posts: 9

PostPosted: Tue Jul 18, 2006 3:40 pm    Post subject: Re: PHP to edit files Reply with quote

Rik wrote:

Quote:
Very possible, not even that complicated.

Excellent, thats good to hear.

Quote:
At specific times: hardly doable with PHP. Something has to trigger the
script. With the proper access, you might schedule loads and loads of
different cronjobs at specific times, but that's hardly a workable solution.

True enough, i see your thinking.

Quote:
As it's about email, the "specific" time doesn't really matter though, you
can't predict how long an e-mail will take to arrive.

I was hoping to be accurate to + or - 5 minutes, approximately, i think
thats fairly achievable with technology the way it is now, any more
accurate is unncessary.
Quote:

I'd just schedule a cronjob every 15 minutes or so, that queries the
database for tasks to perform. That should do it. If cronjobs aren't
possible, you could trigger it on site visits. If you've got a popular page,
you don't want to trigger it verey time. Add a possibility you will trigger
the script. Possibility = 1 / (average visitors per interval)


Right, I'll go with the cron option as i know it fairly well - i'll
have a bash at working up a script that will check the database and
I'll also have a crack at site as a seperate entity. Thanks for the
pointers - cleared up my approach method, thanks very much.

James
Back to top
JLR
*nix forums beginner


Joined: 19 Oct 2005
Posts: 6

PostPosted: Tue Jul 18, 2006 3:53 pm    Post subject: Re: PHP to edit files Reply with quote

I had some luck with this;
pseudo-cron v1.3
http://www.bitfolge.de/pseudocron-en.html

<coyoteboyuk@hotmail.com> wrote in message
news:1153231677.946059.52700@b28g2000cwb.googlegroups.com...
Quote:
I'm looking at creating a website that basically saves times and dates
and emails specific people (all taken from a mysql database) when times
have passed. I suppose something like a birthday reminder site, but not
quite.

All I'd like to know is: Is this possible and how much of an
undertaking is it to get the emails out at specific times, instead of
run as a batch at fixed times from a linux cron script.

Cheers
J
Back to top
Coyoteboy
*nix forums beginner


Joined: 09 Mar 2006
Posts: 9

PostPosted: Tue Jul 18, 2006 4:17 pm    Post subject: Re: PHP to edit files Reply with quote

Comcast-jraff wrote:
Quote:
I had some luck with this;
pseudo-cron v1.3
http://www.bitfolge.de/pseudocron-en.html



Thanks for the pointer. For the moment i cant guarantee web traffic as
often as i'd have to guarantee job execution, although I could leave
the server refreshing the main page every few minutes - seems a bit of
a "crowbar" method. If my site gathers enough users i would definitely
cosider that option though, thanks! It will be a very narrow user-group
initially so i dont expect more than a few visits per day.

Thanks
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [5 Posts] View previous topic :: View next topic
The time now is Thu Jan 08, 2009 6:41 am | All times are GMT
navigation Forum index » Programming » PHP
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts howto log in from one bsd-server to another and move file... Tobias Steer FreeBSD 3 Thu Jul 20, 2006 10:02 am
No new posts Binary Files Ronin C++ 8 Wed Jul 19, 2006 3:12 pm
No new posts Bug#378877: ITP: libsvm-doc -- documentation and example ... Rudi Cilibrasi devel 0 Wed Jul 19, 2006 1:50 pm
No new posts Bug#378873: ITP: libsvm0-dev -- development files for Lib... Rudi Cilibrasi devel 0 Wed Jul 19, 2006 1:20 pm
No new posts Bug#378866: ITP: libnanohttp1-dev -- header files for nan... Rudi Cilibrasi devel 0 Wed Jul 19, 2006 12:40 pm

Mortgages | The eBay Song | Car Finance | Magazine Subscriptions | Banruptcy
Copyright © 2004-2005 DeniX Solutions SRL
 
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum | 
Privacy Policy


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1794s ][ Queries: 16 (0.0922s) ][ GZIP on - Debug on ]