CodeIgniter Forums
Job Alert System - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: Choosing CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=8)
+--- Thread: Job Alert System (/showthread.php?tid=67815)



Job Alert System - ojchris - 04-12-2017

I inherented a Job portal developed in CI 2, so I started learning to use CI two months ago. I've done extensive rework of the platform, now I would like to have a job alert system where a user can search for a keyword and save the search to receive email alerts when ever jobs related to the saved search keyword (S) is/are posted and enabled. I'll like to know how the experts in the house would go about solving this. Thank you.

Ojchris


RE: Job Alert System - Diederik - 04-13-2017

First make a separate table containing user_id's and keywords and let your users fill their keywords.

Then by using a cronjob periodically execute some task that searches the (new) jobs descriptions for these keywords. If it matches, send out an email and store the match (user_id/job_id) in another table so you don't send out the same email twice.


RE: Job Alert System - ojchris - 04-16-2017

(04-13-2017, 12:36 AM)Diederik Wrote: First make a separate table containing user_id's and keywords and let your users fill their keywords.

Then by using a cronjob periodically execute some task that searches the (new) jobs descriptions for these keywords. If it matches, send out an email and store the match (user_id/job_id) in another table so you don't send out the same email twice.

Thanks Diederik. Thank you for the ideas. Is there any existing code on codeigniter cronjob set up you can direct me to?


RE: Job Alert System - visualsol - 04-17-2017

To implement frontend, try this: taggle https://sean.is/poppin/tags

Include a model base class such as igo_model from Ignition-Go https://github.com/ci-blox/Ignition-Go/tree/master/igocore/core

Make/generate a tag model.

Then in your controller,
PHP Code:
$data['tags'] = $tag_model->find_all(); 

In view,

Code:
<script>
var validTags = </php [loop to spit out $tags here]  ?> ;

then include taggle code..


(04-13-2017, 12:36 AM)Diederik Wrote: First make a separate table containing user_id's and keywords and let your users fill their keywords.

Then by using a cronjob periodically execute some task that searches the (new) jobs descriptions for these keywords. If it matches, send out an email and store the match (user_id/job_id) in another table so you don't send out the same email twice.

Thanks Diederik. Thank you for the ideas. Is there any existing code on codeigniter cronjob set up you can direct me to?
[/quote]


RE: Job Alert System - ojchris - 04-19-2017

Thank you visualsol for the idea on frontend implementation. But what I need is how to set up the cronjob, not really how to save the searched terms to the user's profile. Once the searched terms are stored, the code to implement the cronjob is what I have no idea how? Any help is appreciated.


RE: Job Alert System - Waschi - 04-19-2017

(04-19-2017, 01:37 AM)ojchris Wrote: Thank you visualsol for the idea on frontend implementation. But what I need is how to set up the cronjob, not really how to save the searched terms to the user's profile. Once the searched terms are stored, the code to implement the cronjob is what I have no idea how? Any help is appreciated.
You can write a Controller, which is doing that search task.
Make sure, that the php script is running on the cli. (https://www.codeigniter.com/userguide2/general/cli.html)
(so you prevent calls from the browser/other people)
Than you can run the php script on the cli on your server.
When you have a linux server, you could write a sh-script which is running the php-script.
This sh-script can you add to your Crontab.  (http://www.makeuseof.com/tag/linux-task-scheduling-crontab-explained/)


RE: Job Alert System - ojchris - 07-21-2017

(04-19-2017, 05:52 AM)Waschi Wrote:
(04-19-2017, 01:37 AM)ojchris Wrote: Thank you visualsol for the idea on frontend implementation. But what I need is how to set up the cronjob, not really how to save the searched terms to the user's profile. Once the searched terms are stored, the code to implement the cronjob is what I have no idea how? Any help is appreciated.
You can write a Controller, which is doing that search task.
Make sure, that the php script is running on the cli. (https://www.codeigniter.com/userguide2/general/cli.html)
(so you prevent calls from the browser/other people)
Than you can run the php script on the cli on your server.
When you have a linux server, you could write a sh-script which is running the php-script.
This sh-script can you add to your Crontab.  (http://www.makeuseof.com/tag/linux-task-scheduling-crontab-explained/)

Thank you @Waschi your sugestion will help thanks. I'll get back if I run into any challenges.