WilmotS Posted February 19, 2011 Share Posted February 19, 2011 I have created my lottery script. At the moment i simply have the time() function being used where the draw will happen. Im wondering if your able to get rid of that and just choose a particular time where i want the draw to happen. I want the draw to be done at 4pm everyday. (in GMT) Is this possible? and what would the right code be for it. Link to comment https://forums.phpfreaks.com/topic/228198-setting-a-particular-time/ Share on other sites More sharing options...
Pikachu2000 Posted February 19, 2011 Share Posted February 19, 2011 You would need to set up a cron job to run the script at a certain time of the day. The script can't invoke itself, so the server would have to do that. Link to comment https://forums.phpfreaks.com/topic/228198-setting-a-particular-time/#findComment-1176734 Share on other sites More sharing options...
silkfire Posted February 19, 2011 Share Posted February 19, 2011 Let your webhost do a cron job for you. Set the URL to execute to be the address of your lottery script. Link to comment https://forums.phpfreaks.com/topic/228198-setting-a-particular-time/#findComment-1176799 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.