How to run one-time job at specific time in future? #44197
Unanswered
ProteanCode
asked this question in
Q&A
Replies: 2 comments 1 reply
-
Schedule is cronjob. You need to dispatch a job with a delay. |
Beta Was this translation helpful? Give feedback.
1 reply
-
hi, @ProteanCode ... i also have problem like you.. then, i decided to develop my own laravel package that can ease your life... https://github.com/syamsoul/laravel-action-delay just install via and run the system will ask all the things that you need, for example: What action you want to delay? [Laravel Jobs]:
[1] Laravel Jobs
[2] Database Query
[3] PHP Code
[4] External Process
> 2
Enter MySQL query:
> UPDATE `variables` SET `_value`='false' WHERE `_key`='maintainance_mode_enabled'
What time to execute (in UTC time, format:Y-m-d H:i:s):
> 2024-06-01 08:30:35 another example What action you want to delay? [Laravel Jobs]:
[1] Laravel Jobs
[2] Database Query
[3] PHP Code
[4] External Process
> 3
Enter PHP code:
> \App\Models\Variable::where('_key', 'maintainance_mode_enabled')->update(['_value' => 'false']); \App\Models\Variable::where('_key', 'new_feature_enabled')->update(['_value' => 'true']);
What time to execute (in UTC time, format:Y-m-d H:i:s):
> 2024-06-01 08:30:35 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to do something like that
Where playground is some controller method
But this does not put a task in jobs table
I must also be able to update that job because its start is equal to a database field value which may change
Beta Was this translation helpful? Give feedback.
All reactions