Scheduler jobs are not running

i am using crm v8 i have added cronjob and changed ther server user to doeman but my schedulers are not working

How do you know the cron job is running? Do you get notified of the cron run output? You should check that for errors, it’s super helpful in figuring out why cron isn’t running. Pretty much if the cron is run, the schedulers work. If the schedulers are not running it’s 99% a problem with your cron job. Here are the most likely things I’ve run into to check:

  1. Incorrect File permissions
  2. Incorrect path to php
  3. Incorrect path to cron script
  4. File ownership problems
  5. Not enough memory allocated to cron
  6. cron not allowed to run as user
  7. to low max_execution_time

Once you go through all 7 of the above, you’re bound to find your issue.

1 Like

@pstevens i have followed these steps but i found following errors

cron.php running with user that is not in allowed_cron_users in config.phpPHP Fatal error: Uncaught Exception: cron.php running with user that is not in allowed_cron_users in config.php in /bitnami/suitecrm/public/legacy/include/utils.php:2052
Stack trace:
#0 /bitnami/suitecrm/public/legacy/cron.php(70): sugar_die()
#1 {main}
thrown in /bitnami/suitecrm/public/legacy/include/utils.php on line 2052

i am using (bitnami SuiteCRM8 Appliance ) with php 8

Ah OK so it’s #6 in my list. Here’s what you do…

Uncaught exception ‘Exception’ with message 'cron.php running with user that is not in allowed_cron_users in config.php
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();

Upload this php file to your suiteCRM server. 3) Access this file (via URL http://yourdomain/get_current_user.php 1) 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',
 ),

An easy way to get that user name information is to look at the crontab instructions at the bottom of the screen in Admin / Schedulers

1 Like

@pgr I learn something new every day! Yes it shows the user there too. Good to know.

@pgr i have followed these instructions but unable to ren schedulers

Assuming you figured out that cron jobs is running as “abc” and added “abc” to allowed cron users. What errors are you getting now? Are you still getting : Exception: cron.php running with user that is not in allowed_cron_users in config.php or a different errror?