Cron Job?

Discussion in 'PHP' started by nes_jr429, Apr 16, 2013.

  1. #1
    Hello everyone I need your help guys, how to set up a cron jobs that will check the schedule of the patients records everyday and will send an email notification to the admin if there is a date scheduled one day before of the patient schedule? thanks
     
    Solved! View solution.
    nes_jr429, Apr 16, 2013 IP
  2. kingofdollars

    kingofdollars Well-Known Member

    Messages:
    97
    Likes Received:
    12
    Best Answers:
    1
    Trophy Points:
    110
    #2
    You need a script to do that functionality and then set up corn job to call that function at midnight

    So u need a programmer to do the coding first
     
    kingofdollars, Apr 16, 2013 IP
  3. ChiragKalani

    ChiragKalani Active Member

    Messages:
    41
    Likes Received:
    2
    Best Answers:
    3
    Trophy Points:
    73
    #3
    As kingofdollars say, You require developer to write a script.
    If you have script ready, you can set it in cpanel of server. You can find the steps here. http://docs.cpanel.net/twiki/bin/view/AllDocumentation/CpanelDocs/CronJobs
    Or if you have windows system, you set cron job using schedule task.
     
    ChiragKalani, Apr 17, 2013 IP
  4. Alex Roxon

    Alex Roxon Active Member

    Messages:
    424
    Likes Received:
    11
    Best Answers:
    7
    Trophy Points:
    80
    #4
    And of course, if you don't have cPanel, use crontab.
     
    Alex Roxon, Apr 17, 2013 IP
  5. nes_jr429

    nes_jr429 Member

    Messages:
    27
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    31
    #5
    Thanks for your replies, I appreciate it :)... By the way I already made a script for this and target the script file on my cpanel cron jobs, my problem now is I would like to designate where the email notifications will be going to send, the scenario is this, there are lot client admin accounts and each accounts have their own patients records, so when the script run(at midnight), the email notifications should send to the client admin accounts and inside of that notifications are the list of patient scheduled date that is under on their account.. I can't get this tricky part, maybe you have an idea.. thanks..
     
    nes_jr429, Apr 17, 2013 IP
  6. #6
    You have to write everything in your scripts like to whom email should be sent, what information in that etc. and then just your set your script to run on particular time in cpanel cronjob.

    You can run the php script by
    php /path-to-folder/your-script-name.php
    Code (markup):
    Thats it. Hope this make you clear.
     
    ChiragKalani, Apr 18, 2013 IP
  7. nes_jr429

    nes_jr429 Member

    Messages:
    27
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    31
    #7
    yeah I got it man, thanks for your help.. really appreciate it.. thanks... :)
     
    nes_jr429, May 5, 2013 IP