How to set up this cron task on my Kimsufi shared hosting.
(crontab -l; echo "* * * * * cd /home/monglup/www/blog;/usr/local/php8.3/bin/php bin/grav scheduler 1>> /dev/null 2>&1") | crontab -
How to set up this cron task on my Kimsufi shared hosting.
(crontab -l; echo "* * * * * cd /home/monglup/www/blog;/usr/local/php8.3/bin/php bin/grav scheduler 1>> /dev/null 2>&1") | crontab -
Hello @BenLaKnet
In this type of hosting, scheduled‑task management is done through the OVHcloud client area.
Take a look at how Crear tareas automatizadas (CRON) en un alojamiento web.
Let us know, best regards.
Sergio Turpín
Heads up, the cron delay on OVH is 1 hour. That’s not ideal if you have a WordPress.... You can also use the free cronjob service with a more suitable range of frequencies.
Should I rewrite a shell or PHP script that does this?
the “cd” command then launching the “php” script?
But I don’t see how.
Hi @BenLaKnet
Yes, indeed, in the client area you cannot run the full command you used in the terminal directly. The interface is designed for you to specify the script (PHP or shell) you want to execute, not the full command with cd.
To get your cron job working, you need to create a script that does two things:
The simplest way is to create a script file in your hosting. You can do it like this:
#!/bin/bash
cd /home/monglup/www/blog
/usr/local/php8.3/bin/php bin/grav scheduler
Now go to the client area, to the CRON section of your hosting, and create a new task with these details:
Remember what @EricB19 mentioned: on OVHcloud shared hosting, the minimum execution frequency for cron jobs is once per hour.
Hope this helped,
Sergio Turpín
The 755 permission gives the owner full access (read, write and execute), while the group and other users only get read and execute ↩︎
I had indeed thought of that idea, but I was hoping for a simpler one.
Thank you for your help.