Tazerenix Posted February 13, 2010 Share Posted February 13, 2010 I'm working on some forum software and for bans and such, is there a way you can define scheduled tasks such as expiring a ban or changing a users status without using cron? Link to comment https://forums.phpfreaks.com/topic/191928-scheduled-tasks-without-cron/ Share on other sites More sharing options...
mapleleaf Posted February 13, 2010 Share Posted February 13, 2010 Depends how busy your site is and how important the timing of the scheduled task is. Your home page could always hit the database and check if a task has been run and if not run it. You would need to set up the intervals etc and just update the database when i is done adding a new time to run it. Cron is way better of course Link to comment https://forums.phpfreaks.com/topic/191928-scheduled-tasks-without-cron/#findComment-1011598 Share on other sites More sharing options...
Tazerenix Posted February 13, 2010 Author Share Posted February 13, 2010 yea, but my problem is that if a user is going to use the software on a windows based server will cron still be supported? Link to comment https://forums.phpfreaks.com/topic/191928-scheduled-tasks-without-cron/#findComment-1011602 Share on other sites More sharing options...
trq Posted February 13, 2010 Share Posted February 13, 2010 yea, but my problem is that if a user is going to use the software on a windows based server will cron still be supported? Cron is not available on windows, though there is always scheduler. Link to comment https://forums.phpfreaks.com/topic/191928-scheduled-tasks-without-cron/#findComment-1011623 Share on other sites More sharing options...
Tazerenix Posted February 13, 2010 Author Share Posted February 13, 2010 can you use scheduler in php code? Link to comment https://forums.phpfreaks.com/topic/191928-scheduled-tasks-without-cron/#findComment-1011624 Share on other sites More sharing options...
trq Posted February 13, 2010 Share Posted February 13, 2010 Both Cron and Scheduler have nothing to do with php. You use them to execute commands / scripts. So yeah, scheduler can execute php scripts if that's what your asking. Link to comment https://forums.phpfreaks.com/topic/191928-scheduled-tasks-without-cron/#findComment-1011625 Share on other sites More sharing options...
Tazerenix Posted February 13, 2010 Author Share Posted February 13, 2010 hmm, i think its easier just to check them on every page load XD Link to comment https://forums.phpfreaks.com/topic/191928-scheduled-tasks-without-cron/#findComment-1011627 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.