Laravel - Scheduler

    protected function schedule(Schedule $schedule)
        // Import LDAP users hourly.
        $schedule->command('ldap:import ldap', [
            '--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 LDAP filter - be care if using delete-missing to include a filter for ALL your records
* * * * * cd /path-to-your-project && php artisan schedule:run >> /dev/null 2>&1

Program Script: “C:\Program Files\PHP\v7.3\php.exe”
Arguments: C:\inetpub\laravel\demo1\artisan schedule:run

  • code/laravel/scheduler.txt
  • Last modified: 2020/04/24 16:36
  • by gerardorourke