Laravel: How to clear cache with Bash .sh script

  bash, caching, laravel

Using Windows.
I want to write and call a .sh script which will contain:
ssh [email protected]name.com
cd /var/www/api.name.com
php artisan cache:clear
php artisan responsecache:clear
php artisan config:cache

At the moment it’ll just login but not navigate to the directory or run the php artisan parts.
I will then schedule this to run with windows task scheduler.

Source: Laravel

Leave a Reply