I would like to add a bash script that periodically deletes logs on Laravel Forge. I have placed the script in /home/forge/mysite.com/scripts/delete_logs.sh. How do I reference this file in the Forge Sheduler. The default command in the sheduler is as below;
php /home/forge/default/artisan schedule:run
How do I modify this command so that the sheduler may reference my Bash script?
That command just executes all of the scheduled tasks defined in the kernel. You can just add your shell command and execute it there with the others being executed.
Hi @nash . Yes, I have checked and Logrotate is installed but I do not understand its setup. However, after reading the documentation, I feel it is just a different approach to using the Forge scheduler to achieve the same thing. I just need to know how to call a php script using the $schedule->exec() command.