0

Trying to schedule command in Larval:

$schedule->command('Cname')->everyFiveMinutes(); -- Works just fine

But when I give specific day and time like -

    $schedule->command('Cname')->weeklyOn(3,'9:10');
or 

    $schedule->command('Cname')->weekly()->thursdays()->at('09:10');

Its not working 

what am I doing wrong? any thoughts/ suggestions?

Dave Carruthers
  • 542
  • 1
  • 8
  • 29
JKLM
  • 1,470
  • 3
  • 28
  • 66

1 Answers1

2

I believe you can just use the cron expression * * * * * *

$schedule->command('Command Name')->cron('10 9 * * 4');

Execute by At 09:10 on Thursdays Weekly

Explanation

 * * * * *  command to execute
 ┬ ┬ ┬ ┬ ┬
 │ │ │ │ │
 │ │ │ │ │
 │ │ │ │ └───── day of week (0 - 7) (0 to 6 are Sunday to Saturday, or use names; 7 is Sunday, the same as 0)
 │ │ │ └────────── month (1 - 12)
 │ │ └─────────────── day of month (1 - 31)
 │ └──────────────────── hour (0 - 23)
 └───────────────────────── min (0 - 59)
ZeroOne
  • 8,996
  • 4
  • 27
  • 45