ethereal1m Posted March 27, 2012 Share Posted March 27, 2012 Dear all, what is the most practical way to implement scheduler between codeigniter application and a database? Suppose I want to create a service that does a query in CI and do that regularly. Is this possible? If yes, how? regards, ethereal1m Quote Link to comment https://forums.phpfreaks.com/topic/259799-scheduler-that-interacts-with-ci-or-php-and-database/ Share on other sites More sharing options...
trq Posted March 27, 2012 Share Posted March 27, 2012 Yes it's possible. Querying a database doesn't really have anything to do with CI though, though I suppose you could use it's DB libraries if you where that way inclined. Anyway, all you need do is write a script, and have that script executed via cron. http://en.wikipedia.org/wiki/Cron Quote Link to comment https://forums.phpfreaks.com/topic/259799-scheduler-that-interacts-with-ci-or-php-and-database/#findComment-1331531 Share on other sites More sharing options...
ethereal1m Posted March 27, 2012 Author Share Posted March 27, 2012 oh.. that was a good idea.. I was thinking about using oracle scheduler to do the job (it is a oracle database). Ok, this is the detail scenario I should had mentioned earlier, suppose there is filter that is customizable via CI GUI. Basically the filter tells a condition of a query, for example which 'column' or which 'where clause' condition of a database table suppose to be fetched. The one that does the actual execution of a query is a pl/sql procedure that resides in the database. The query uses the configuration that it gets from the filter. So I'm thinking about making the CI GUI upload the filter configuration into a text file and let the pl/sql procedure read the configuration. The procedure is then executed by scheduler (whatever that is). Is this doable? Is there any more practical way to do this? The interface must use CI but the scheduler and the entity that does the query can be anything... Quote Link to comment https://forums.phpfreaks.com/topic/259799-scheduler-that-interacts-with-ci-or-php-and-database/#findComment-1331588 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.