ctml okey, how to find my flarum folder? my vendor? public folders at in the home/codestac/public_html

3 months later

I am not able to get my scheduler working as per the following screenshot:

My cronjob is configured to the following format:

cd /home/MY_USERNAME/domains/MY_DOMAIN/public_html/discussions && /usr/bin/php flarum schedule:run >> /dev/null 2>&1

Can anyone help me troubleshoot this as to why scheduler is not working?

    whisperwow can you verify that you are targeting the command in the right directory? Did you try running the command manually (not in a cron) to verify it works?

    whisperwow try executing this command without dev null manually and see if you encounter any errors:

    cd /home/MY_USERNAME/domains/MY_DOMAIN/public_html/discussions && /usr/bin/php flarum schedule:run

      luceos I was successfully able to execute the above command (with my username and domain of course) directly from the SSH Command line. However, the cron job still does not work.

        luceos Not sure I understand your question. When I log into the SSH command line through my Terminal program, I login with the SSH password. No user is specified. When I am in my Hostinger Hpanel, I am logged in as an admin setting up the cronjob. I am the only user on the account.

          whisperwow the question relates to the cronjob you set up

          whisperwow My cronjob is configured to the following format:

          cd /home/MY_USERNAME/domains/MY_DOMAIN/public_html/discussions && /usr/bin/php flarum schedule:run >> /dev/null 2>&1

          Where exactly is that set up, did you use crontab on the server? If so, as what user?

            luceos I am using the cronjob feature of my Hostinger hosting account. Following is my cronjob with the username displayed:

            cd /home/MY_USERNAME/domains/MY_DOMAIN/public_html/discussions && php flarum schedule:run

            Does that help?

              luceos OK thanks for the replies. I'll check again with Hostinger support.

              whisperwow I'm a bit confused, because that is not the syntax for a crontab.

              The cron job syntax looks like this:
              https://en.wikipedia.org/wiki/Cron#Overview

              I guess you are using some GUI I'm not familiar with:
              https://support.hostinger.com/en/articles/1583465-how-to-set-up-a-cron-job-at-hostinger

              Could you provide a screenshot, just for the sake of clarity?

              Also, don't you have any shell access? If so, can you do "crontab -l" to show your current crontab and "crontab -e" to edit it?

              whisperwow having been responsible over an inhouse developed control panel for over 7 years, I can only be astonished about how user unfriendly this is. But glad you figured it out.

              BeeMeme I suggest you reach out to your hosting provider directly. Perhaps if you share some details on where your community is hosted, we can help you better.

              23 days later

              I've set the cronjob correctly to run every minute, I have the FoF sitemap extension enabled and set to rebuild hourly but on the dashboard I still see "Scheduler - Inactive". It seems to be running, I see the updates in the sitemap.xml. What is wrong?

              6 days later

              whisperwow Sorry to bother you, but could you help me on that ? It doesn't seem to do anything.

              Did you write /usr/bin/php in before the flarum schedule ?
              I have this as the bash script :
              #!/bin/sh
              cd /home/u123456789/domains/example.com/public_html/forum/ && /usr/bin/php flarum schedule:run >> /dev/null 2>&1

              It doesn't seem to do anything. I also have that :
              https://ibb.co/Ks2JLjv

              It somehow works on my Rapsberry Pi or in any Linux machine. But not on Hostinger. I will presumably self host at some extent.

              14 days later

              I have used cPanel to set up the cron job on my hosted site. It runs as scheduled but I get the error message:

              **Composer detected issues in your platform:

              Your Composer dependencies require a PHP version ">= 8.2.0". You are running 7.4.33.**

              But this doesn't seem to be correct. in cPanel I have a PHP Selector which says the current version is set to 8.2. Also, from the Flarum admin dashboard the versions are shown as:

              Flarum 1.8.5
              PHP 8.2.21
              MySQL 10.6.18-MariaDB-cll-lve

              I don't know anything about Composer so would appreciate some help in figuring out what is going on here.

                AndyS

                Ignore me. I didn't fully understand the instructions for setting up the cron job. I had the wrong path to PHP even though the instructions clearly said I might need to play with the path a bit.