Cron Job Hosting Rules

I know this is an old thread, but I came across it looking for a solution for how to set up cron jobs on siteground for SuiteCRM.

Here is a working cron job:

/usr/local/php70/bin/php-cli -q /home/ACCOUNT_NAME/public_html/crm/cron.php

They do have a policy to set it for every 30 minutes. That should be fine.

Also, I had an issue where it said the user was not allowed to run the cron job… I found a great solution on easycron’s site:

If you get error: Uncaught exception ‘Exception’ with message 'cron.php running with user that is not in allowed_cron_users in config.php in your cron job execution logs, you need to do the following to fix it: 1) create a php file named “get_current_user.php” with the following code:

<?php
echo get_current_user();
  1. Upload this php file to your suiteCRM server. 3) Access this file (via URL http://yourdomain/get_current_user.php) from a web browser, copy the output of the it (e.g. xxzzyy), and add a line of below code:
1 => 'xxzzyy',
to
    'allowed_cron_users' => 
    array (
      0 => 'www-data',
    ),

in the “config.php” file in your suiteCRM installation (remember to replace “xxzzyy” with the real output of your get_current_user.php). So that that part of code would look like:


    'allowed_cron_users' => 
    array (
      0 => 'www-data',
      1 => 'xxzzyy',
    ),

Hope this saves someone some time if they run into this issue.