Results 1 to 6 of 6

Thread: Email Scheduler on Mac OSX

  1. #1
    callumm is offline Junior Member
    Join Date
    Dec 2011
    Posts
    4

    Default Email Scheduler on Mac OSX

    Hi Guys

    I am trying to get the email to case function working on a Sugar install running on OSX Server. It appears the check inbound email scheduler is not running. I havent found any definitive guide to do this for Mac OSX.

    SugarCRM Community Edition 6.3.0
    OSX 10.7.2 (OSX Server Tools installed)

    Running the web server on OSX including PHP functionality.

    sugar is located at localhost/sugar (install path /Library/Server/Web/Data/Sites/Default/sugar) Currently the CRM is only available on the internal network.

    Inbound email settings are setup, and tested as working using the test function. Sugar can communicate with the server, as it can retrieve the folder list to choose an INBOX folder, TRASH folder etc. Sending email is also working ok.

    The scheduler page asks me to add the following to my crontab:

    "Note: In order to run Sugar Schedulers, add the following line to the crontab file:
    * * * * * cd /Library/Server/Web/Data/Sites/Default/sugar; php -f cron.php > /dev/null 2>&1"

    However OSX does not use cron to run scheduled tasks. I have tried to follow the guide here:

    » cron jobs | SugarCRM Knowledge Base

    I have added the following to the plist as suggested:


    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    <key>Label</key>
    <string>com.sugarcrm.Scheduler</string>
    <key>ProgramArguments</key>
    <array>
    <string>/usr/bin/curl</string>
    <string>/Library/Server/Web/Data/Sites/Default/sugar/cron.php</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
    <key>StartInterval</key>
    <integer>1</integer>
    </dict>
    </plist>



    The line in bold is the line i think i need to get correct, but the article above does not give any indication of what this line should be. This matches where the cron.php file is installed on my server. i do not know if i need to somehow then add a cron job to this file, or create a crontab somewhere else for the scheduler to run?

    Any advice would be greatly appreciated!

  2. #2
    item is offline Sugar Community Member
    Join Date
    Oct 2010
    Location
    BELGIUM
    Posts
    193

    Default Re: Email Scheduler on Mac OSX

    Hi,
    i use OSX 10.5.8 and i have not problem with sheduler
    Your plist seemt to be error, you must write : http://mycrm/.....
    I will give my configuration later...no i go sleep

    Just one question : OSX server 10.7 come with postgress, have you installed MySQL for 10.6 ?
    What do you think about this "hack" in the future ?

    Regards
    CE 6.2.4
    Osx Server 10.5.8
    Apache - MySql - Php built-in
    sorry for my good english

  3. #3
    callumm is offline Junior Member
    Join Date
    Dec 2011
    Posts
    4

    Default Re: Email Scheduler on Mac OSX

    Thanks for your reply!

    I will correct the plist to http://localhost/sugar/cron.php

    However i know that when i try and cat this file it doesnt appear to resolve the link, so i was worried that it was not the correct file path.

    I would appreciate if you can post your setup, this may be very helpful.

    I have MySQL installed on the server too for some other CRMs that i was testing.
    Last edited by callumm; 2011-12-16 at 08:23 AM.

  4. #4
    callumm is offline Junior Member
    Join Date
    Dec 2011
    Posts
    4

    Default Re: Email Scheduler on Mac OSX

    I think i solved this.

    The missing instruction is that you then need to add the cron job to the cron.php file in the web server. I didnt realise you could just add the job at the end of this file.

    * * * * * cd /Library/Server/Web/Data/Sites/Default/sugar; php -f cron.php > /dev/null 2>&1

    Hooray!

  5. #5
    callumm is offline Junior Member
    Join Date
    Dec 2011
    Posts
    4

    Default Re: Email Scheduler on Mac OSX

    update:

    The Mail scheduler ran 7 or 8 times for about 20 minutes, and now it has not run again since.

    I am not sure where the problem might be, maybe in the cron file?

  6. #6
    item is offline Sugar Community Member
    Join Date
    Oct 2010
    Location
    BELGIUM
    Posts
    193

    Default Re: Email Scheduler on Mac OSX

    My plist who work for HTTPS
    /library/LaunchDeamons/com.sugarcrm.Scheduler.plist

    PHP Code:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
        <key>Label</key>
        <string>com.sugarcrm.Scheduler</string>
        <key>ProgramArguments</key>
        <array>
            <string>/usr/bin/curl</string>
            <string>-s</string>
            <string>-k</string>
            <string>https://127.0.0.1/cron.php</string>
        </array>
        <key>RunAtLoad</key>
        <true/>
        <key>StartInterval</key>
        <integer>60</integer>
        <key>UserName</key>
        <string>_www</string>
    </dict>
    </plist>
    CE 6.2.4
    Osx Server 10.5.8
    Apache - MySql - Php built-in
    sorry for my good english

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 74
    Last Post: 2010-11-18, 11:22 PM
  2. Scheduler for email campaign
    By gobezu in forum Help
    Replies: 3
    Last Post: 2008-07-02, 11:09 PM
  3. Inbound Email Scheduler Bug ?
    By kokwei in forum Help
    Replies: 8
    Last Post: 2006-05-15, 06:06 PM
  4. Replies: 1
    Last Post: 2006-02-17, 05:51 AM
  5. 4.0.0 Beta Email Scheduler
    By bretvenuso in forum Help
    Replies: 3
    Last Post: 2005-12-03, 03:23 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •