S
S
suhuxa12017-10-01 21:55:31
Laravel
suhuxa1, 2017-10-01 21:55:31

How to run a command every 2 or 3 hours in laravel schedule?

I study office. documentation: there is hourly and there is daily. But how to run a task so that it runs every 2 hours, or 3, or 4? Do you really have to resort to customization:
->cron('* * * * * *');
Thank you in advance!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Victor, 2017-10-01
@v_decadence

What is the problem with this setting? All these methods are just wrappers over the cron method.
Your case is not so frequent, it seems there is no suitable wrapper.

A
Alexey Grebenikov, 2017-10-25
@grealexti

2 - * */2 * * *
3 - * */3 * * *
.... etc.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question