Cron Job not Working

I created a slide that has a slideshow of photos on it. I spent quite a while getting it built and the preview looks great.

But then I click PUBLISH and i get a conversion warning for every photo:

There is an error with this Layout: XXXXXXXXXXXX.jpg is pending conversion

I did some searching and found that my Tasks have NEVER run before. I tried manually and then I tried to add the cron job but all I get back is this error:

{“success”:false,“error”:500,“message”:“Unexpected Error, please contact support.”}

Now I am completely stumped.

Info:

  • Version: 4.2.3
  • Webserver: Webmin (local)

Your images may be in 4K resolution.

Regarding your tasks, a 500 error indicates something is wrong with your server.

Try increasing the PHP memory limit and then rerun your tasks:

PHP.ini

memory_limit = 2048M

For example, my PHP configuration is set to use 2 GB of RAM:

Note: if your tables are larger than the PHP memory limit, the tasks will fail.

If that doesn’t work, try running them one at a time.

I had mem set to 2000, but I doubled it (has a total of 8gb available) to see if it works.

How do I run them one at a time? Though the GUI? Under Tasks? When I click “Run Now” on any of them I get a green success message but nothing else changes and there is still no “Last Run” timestamp.

Turns out I can run the code as root but not as www-data even after changing the ownership.

Now that I ran the job, I still can’t Publish because it still wants to convert the images but hasn’t.

When I first started I had the problem of tasks not working on my Xibo installation using Apache2. It turned out that I had not configured my environment properly.

First you need to have your library folder properly configured within Xibo. You need to specify the exact path under Settings → Configuration → Library Location
In my case, this is: /srv/xibo-cms/xibolibrary/

On the server, remember to also move the files to this correct location.

For tasks to run, XTR needs to be working and configured correctly.
In the command line, enter the following commands:


Important: Replace the PHP version and Xibo installation path to your environment.

Give www-data ownership of all the files in your Xibo installation folder

sudo chown -R www-data: /srv/xibo-cms

Check if you receive any errors
XTR will give an error if the library location is not properly configured

/usr/bin/php8.3 /srv/xibo-cms/bin/xtr.php

Open the crontab configuration

crontab -e

Paste in the the following line

* * * * * /usr/bin/php8.3 /srv/xibo-cms/bin/xtr.php

This should solve the problem with tasks and image processing not working. Keep in mind XTR runs once every minute, when you click “Run now” it may take a minute for it to actually run.

1 Like

Keep in mind that when your layout contains images larger than 1920x1080, it will wait for image processing to convert all images to a width of 1920 pixels.

A temporary work-around would be to modify the resolution of the image yourself outside of Xibo, upload it to Xibo and put the rescaled image in the layout.

I would not recommend this approach.

Are you using Windows?

I did this, I have my library away from the www folder for safety. I ran everything without issue or error. The images appear to have been processed now. Thank you all!

1 Like