xxxxxxxxxx
// Settng Cron in AWS
// type command "crontab -e" and paste the below formatted line
* * * * * /pathToYourPhp /pathToArtisan/artisan schedule:run >> /dev/null 2>&1
// for example * * * * * /usr/bin/php7.4 /var/www/html/testproject/artisan schedule:run >> /dev/null 2>&1
xxxxxxxxxx
//for running tasks locally
php artisan schedule:work
//for running task once
php artisan command:name
xxxxxxxxxx
//Show list for all scheduled commands running in laravel
php artisan schedule:list
xxxxxxxxxx
* * * * * cd /path-to-your-project && php artisan schedule:run >> /dev/null 2>&1
xxxxxxxxxx
// everyMinute()
// everyTwoMinutes()
// everyThreeMinutes()
// everyFourMinutes()
// everyFiveMinutes()
// everyTenMinutes()
// everyFifteenMinutes()
// everyThirtyMinutes()
// hourly()
// hourlyAt($offset)
// everyTwoHours()
// everyThreeHours()
// everyFourHours()
// everySixHours()
// daily()
// weekdays()
// weekends()
// mondays()
// tuesdays()
// wednesdays()
// thursdays()
// fridays()
// saturdays()
// sundays()
// weekly()
// monthly()
// quarterly()
// yearly()
$schedule->command('wallets:minute')->everyFiveMinutes();
xxxxxxxxxx
if (App::environment('production')) {
$schedule->command('file:generate')
->daily();
//run your commands here
}