Welcome Guest, Not a member yet? Register   Sign In
System clock or notification system
#1

[eluser]Kentish[/eluser]
Hello all,

I have a photography contest section in my application.

When a contest has meet the deadline,i need a notification system,
to notify the juries of the contests.

Also, i need to notify the organisor when every jury has completed the votes.


Any idea how i can do that please?
#2

[eluser]CroNiX[/eluser]
When you determine that the "contest has met the deadline", can't you just load the jury members and organizer email addresses from the db and send them an email or something?
#3

[eluser]NeoArc[/eluser]
Code:
function __construct(){
  parent::__construct();
  if(strtotime('2012-12-21') < time() ){
     $this->_notify_about_deadline();
  }

}
#4

[eluser]TWP Marketing[/eluser]
The implied expiration of a contest means you need to check the time and/or date on a regular basis, not counting on a user triggering the time check. That means using cron on the server to check the database for any expirations and run an email function or send an alert to the site webmaster.
#5

[eluser]NeoArc[/eluser]
You are right. My example only works on heavily visited websites. (And the hidden time reference will remain ignored)

#6

[eluser]Kentish[/eluser]
well, thanks, guys, that gave me more information about this problem, but still haven't been able to solve it yet.

First , i need my system to determine that a contest has met its deadline automatically and then notify the jury members.

I have done some research based on the keywords and hints from above.

I have found that cron is meant for linux.

Found an alternative for windows, using task scheduler, i tried to put a test php script in a bat file and trying to make the script work before i try the whole alert system.

Please correct me if am wrong and any guidance will be most appreciated.
#7

[eluser]TWP Marketing[/eluser]
Cron as been ported to windows, in several different versions, but whether your server has it installed or not is something you must ask your hosting company, assuming your site is hosted outside of your environment.
I can't advise further on this as I use only linux servers for development and client hosting.




Theme © iAndrew 2016 - Forum software by © MyBB