Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Auto reminder

Status
Not open for further replies.

kehers

Programmer
Aug 31, 2005
56
0
0
A2
I'm setting up an auto reminder on one of my pages whose function is to send a reminder mail to someone on the set date. the drawback however is that it's not automatic. the reminder page will av to be called on the set date before it can perform the function. Is there anyway to automate it such that on the set date, it does its work even without anyone calling the page? Or any other idea?
 
There are products that will do this. You are basically talking about running a cron job... and based on the server operating system that you are using, you will be able to find something by using google.

I set up something on a Windows 2003 Server with Apache/Tomcat that visited a page every 24 hours (and did much the same as you want to do). I just can't remember the tool I used - but it was bundled with the OS and worked fine.

Cheers,
Jeff

[tt]Jeff's Page [/tt][tt]@[/tt][tt] Code Couch
[/tt]
 
Unfortunately, i run on an hosting company and dont av direct interactivity with the server. is there anyway i can still set things up through script-server relationship...i mean through some kinda scripting
 
OK... this isn't perfect... but someone suggested it to me years back and it may suit in this case.

When someone visits the site, check to see if there are any pending reminders to send. If there are... trigger the server to send them off... and continue to serve the page requested to the visitor.

If nobody every visits the website, then the reminders will never get sent out - but as soon as anyone (even a bot spider) visits the site, it can trigger and purge any waiting reminders.

If you have more than 1 hit a day you should be fine [smile]

Cheers,
Jeff

[tt]Jeff's Page [/tt][tt]@[/tt][tt] Code Couch
[/tt]
 
:) Thanks for that...it was kinda funny coz i thought of that too actually - as in setting up a script inside d index page to do that...was only thinking there could be another alternative. Thanks again...but i hope at least someone comes knocking at the site everyday :)
 
A host that doesn't allow you to run cron jobs?
Maybe a better host is what you need - and, it never hurts to ask the hosting company if you can have this feature, otherwise you might be 'forced' to change to a different host.
If it's a *nix OS on heserver, cron is the best thing to do.
 
Get a host thats running on Cpanel and allows Cronjobs via Cpanel.

The other method of doing a job thats called via a page is a bad idea as you cant control it properly.

Plus most hosting panels (like Cpanel) will allow you too keep the script away from a web accessible directory and run it via cron :)

Job Done.

I wish someone would just call me Sir, without adding 'Your making a scene'.

Rob
 
Being very modest and honest, though this sounds freaky, i must confess i dont get wat u pals mean by cron job...having an idea i bet would draw me nearer to the solution.
 
Cron is the program on Linux/Unix thats runs a script at a certain time.

Its like the scheduler on Windows.

All it does is run a script to do a certain job at a certain time.

have a look at [URL unfurl="true"]http://www.sitepoint.com/article/introducing-cron[/url] which gives a basic guide on cron and writing a php script for cron.

I wish someone would just call me Sir, without adding 'Your making a scene'.

Rob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top