• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Job Alert System

#1
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
Reply

#2
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.
Reply

#3
(04-13-2017, 01: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?
Reply

#4
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/t...ocore/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, 01: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]
Reply

#5
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.
Reply

#6
(04-19-2017, 02: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-...explained/)
Reply

#7
(04-19-2017, 06:52 AM)Waschi Wrote:
(04-19-2017, 02: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-...explained/)

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


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
2 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2017 MyBB Group.