luceos yes l write all ways but not send my mail
Setup the Flarum scheduler using cron
- Edited
luceos I received such a message. Is it working properly? delete the one at the end (> /dev/null)?
Worked :
- * * * * /usr/local/bin/php && cd /home/(username)/public_html/ flarum schedule:run > /dev/null
Message : /bin/bash: line 0: cd: too many arguments
Mirzaagha Message : /bin/bash: line 0: cd: too many arguments what is this message?
Mirzaagha l wait more time and every minute send me mail this message but not working schedule my admin panel
Mirzaagha /bin/bash: line 0: cd: too many arguments
This is probably because you are trying to run the entire CRON configuration line as a bash command during testing. When testing, only run the bash command without the schedule part (* * * *
is not part of the command, it's the interval definition for CRON)
Mirzaagha it seems like you have switched the paths around and lost the cd
command, take a look again at the suggested commands earlier in the discussion.
It's cd /path/to/flarum/folder && /path/to/php flarum schedule:run > /dev/null
clarkwinkelmann l know but not working
ctml l try all variants in here but not working. Very bad situation
Mirzaagha your command is wrong, clark showed you here clarkwinkelmann the command you need to use.
cd /home/codestac/public_html && /usr/local/bin/php flarum schedule:run > /dev/null
The path /home/codestac/public_html
assumes your flarum file is located in there. Mine isn't setup quite the same way, so just make sure you are not exposing your config.php
or any other sensitive configurations in public_html
.
ctml okey, how to find my flarum folder? my vendor? public folders at in the home/codestac/public_html
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
- Edited
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.
- Edited
whisperwow as what user are you executing the command? In your panel.
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.