I’m using cPanel to create a cron like so :
* * * * * /home/elsdqscy/folder/update_db.sh > update_db.txt
Inside my shell file I have :
#!/bin/bash
cd folder && php artisan migrate:fresh --seed --force
This should work, knowing that the command /home/elsdqscy/folder/update_db.sh
works in the terminal.
I do get this error in the output file:
In ArgvInput.php line 246:
Invalid argument supplied for foreach()
Content-type: text/html; charset=UTF-8
Any idea what am I doing wrong?
3
Answers
You need to provide the full path inside your shell file as well, like so:
Did you try
Running The Scheduler
laravel doc