Cron Troubleshooting
Permissions Error
- Log on to the webserver that is running Curator.
- In the terminal, login as root user by typing in
su - root
- View the cron by typing in
crontab -e
- If there is content in the crontab file, check to see if the root user is running anything related to Curator. For example, look for “artisan” or “php” commands.
- If these are found, copy these lines and place them somewhere you can reference later - then delete the lines from
this and press
esc
then type:wq
to save the empty file. - Find the user running your web-server. If you are unsure, you can find this on the Settings > Curator > Status page on the backend of Curator.
- Ensuring you’re still logged in as root, edit the crontab file associated with your server-run-as user you found in
the previous step. For example, if your user was “apache” you would type
crontab -e -u apache
and press enter. This will open the crontab file. Pressi
to enter “insert mode” and paste in the contents from step #5. Then pressesc
and type:wq
to save the empty file.
* * * * * php /var/www/html/artisan schedule:run >> /dev/null 2>&1
Test Cron
In order to make sure your cron schedule is running properly, you can manually fire the cron task via Curator’s API using the steps below. If you do not receive a ‘success’ response then you may need to adjust your environment configuration:- Follow instructions in the Auto Generate API Links section and ensure the dropdowns are set to Portal and cron respectively.
- Click the preview link generated
- Link will open in new tab and should display a “success” message