This is an old revision of the document!
Laravel - Scheduler
App/Console/Kernel.php
protected function schedule(Schedule $schedule) { // Import LDAP users hourly. $schedule->command('ldap:import ldap', [ '--no-interaction', '--restore', // This will restore users which were soft deleted and LDAP now says they are enabled '--delete', //This will soft delete any LDAP Users who are now disabled. '--delete-missing', //This will soft delete any records NOT found '--filter' => '(objectclass=user)', //THis is the filter - be care if using delete-missing to include a filter for ALL your records ])->hourly(); }
Cronjob command
* * * * * cd /path-to-your-project && php artisan schedule:run >> /dev/null 2>&1
