PHPackages                             syamsoul/laravel-action-delay - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. syamsoul/laravel-action-delay

ActiveLaravel-package[Database &amp; ORM](/categories/database)

syamsoul/laravel-action-delay
=============================

Delay a Job, Database Query or PHP code at a specific datetime easily with one simple command.

1.4.2(10mo ago)1170[1 issues](https://github.com/syamsoul/laravel-action-delay/issues)MITPHPPHP &gt;=8.0.0

Since Jun 1Pushed 10mo ago1 watchersCompare

[ Source](https://github.com/syamsoul/laravel-action-delay)[ Packagist](https://packagist.org/packages/syamsoul/laravel-action-delay)[ RSS](/packages/syamsoul-laravel-action-delay/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (6)Versions (13)Used By (0)

Action Delay for Laravel
========================

[](#action-delay-for-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/5bfa2d052580a61b3236571c8ae574d726a2fa0b8d198f40e0b5c3f9a2b15a60/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7379616d736f756c2f6c61726176656c2d616374696f6e2d64656c61792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/syamsoul/laravel-action-delay)[![Total Downloads](https://camo.githubusercontent.com/9117360028bc5126147a121c09e9ee3f9ba0bce00d653c0c01a2fd9da269c452/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7379616d736f756c2f6c61726176656c2d616374696f6e2d64656c61792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/syamsoul/laravel-action-delay)[![License](https://camo.githubusercontent.com/1ff576d6b940e8265c627453b8c4bdea8d25937c488f0da5efff7e20801c8eb7/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f7379616d736f756c2f6c61726176656c2d616374696f6e2d64656c61792e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Laravel](https://camo.githubusercontent.com/263b2bea7e167badfab23bd4434a5f2db93dd63bb7eb71dea1275ebca3a09ba2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d31302e782532422d7265642e7376673f7374796c653d666c61742d737175617265)](https://laravel.com)[![PHP](https://camo.githubusercontent.com/407cae97f462622b426bac8a038a78696841ce2f26cf8caaf5059c90b8f729b7/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e312532422d626c75652e7376673f7374796c653d666c61742d737175617265)](https://php.net)

Introduction
------------

[](#introduction)

This package allows you to delay an action (Jobs, Database Query, PHP Code or External Process) at specific datetime with a simple command.

- [Requirement](#requirement)
- [Installation](#installation)
- [Usage](#usage)
- [Single-Line Commands (No Prompts)](#single-line-commands-no-prompts)
- [Interactive Prompts](#interactive-prompts)

Requirement
-----------

[](#requirement)

- Laravel 10.x (and above)

Installation
------------

[](#installation)

This package can be used in Laravel 10.x or higher. If you are using an older version of Laravel, there's might be some problem. If there's any problem, you can [create new issue](https://github.com/syamsoul/laravel-action-delay/issues) and I will fix it as soon as possible.

You can install the package via composer:

```
composer require syamsoul/laravel-action-delay
```

Usage
-----

[](#usage)

You can delay an action via `Artisan` command.

```
php artisan souldoit:action-delay
```

Single-Line Commands (No Prompts)
---------------------------------

[](#single-line-commands-no-prompts)

You can delay actions using single-line commands without any interactive prompts. This is useful for automation, scripts, or when you want to schedule actions programmatically.

#### 1. Delay Laravel Jobs

[](#1-delay-laravel-jobs)

```
php artisan souldoit:action-delay --action=1 --job=\\SoulDoit\\ActionDelay\\Jobs\\ExternalProcessJob --job-parameter="touch newfile.txt" --delay-at="2025-06-25 16:25:00"
```

#### 2. Delay Database Query

[](#2-delay-database-query)

```
php artisan souldoit:action-delay --action=2 --db-query="INSERT INTO \`users\` (\`username\`,\`email\`,\`first_name\`,\`last_name\`,\`created_at\`,\`updated_at\`) VALUES ('user01','user01@gmail.com','User','One',NOW(),NOW())" --delay-at="2025-06-25 15:51:25"
```

#### 3. Delay PHP Code

[](#3-delay-php-code)

```
php artisan souldoit:action-delay --action=3 --php-code="\DB::table('users')->insert(['username'=>'user02', 'email'=>'user02@gmail.com', 'first_name'=>'User', 'last_name'=>'Two', 'updated_at'=>now(), 'created_at'=>now()])" --delay-at="2025-06-25 16:32:00"
```

#### 4. Delay External Process

[](#4-delay-external-process)

```
php artisan souldoit:action-delay --action=4 --command="php artisan down" --command-timeout=600 --delay-at="2025-06-25 16:37:50"
```

**Available Options:**

- `--action`: Action type (1=Laravel Jobs, 2=Database Query, 3=PHP Code, 4=External Process)
- `--job`: Job class name (for action=1)
- `--job-parameter`: Job parameters (for action=1)
- `--db-query`: SQL query (for action=2)
- `--php-code`: PHP code to execute (for action=3)
- `--command`: Command to execute (for action=4)
- `--command-timeout`: Process timeout in seconds (for action=4, default: 600)
- `--delay-seconds`: Delay execution by specified number of seconds from current time
- `--delay-at`: Execution at specific date &amp; time in UTC (format: Y-m-d H:i:s)
-

Interactive Prompts
-------------------

[](#interactive-prompts)

#### 1. Delay Laravel Jobs

[](#1-delay-laravel-jobs-1)

```
 What action you want to delay? [Laravel Jobs]:
  [1] Laravel Jobs
  [2] Database Query
  [3] PHP Code
  [4] External Process
 > 1

 What job you want to delay? [App\Jobs\GenerateCertificate]:
  [1] App\Jobs\GenerateCertificate
  [2] App\Jobs\SendCongratulationsEmail
 > 2

 Please insert #1 parameter: `user` (Type: App\Models\User):
 > \App\Models\User::find(1)

 Please insert #2 parameter: `text` (Type: string):
 > Congratulations on your success!

 What time to execute (in UTC time, format:Y-m-d H:i:s):
 > 2024-06-01 10:16:00
```

#### 2. Delay Database Query

[](#2-delay-database-query-1)

```
 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
```

#### 3. Delay PHP Code

[](#3-delay-php-code-1)

```
 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
```

#### 4. Delay External Process

[](#4-delay-external-process-1)

```
 What action you want to delay? [Laravel Jobs]:
  [1] Laravel Jobs
  [2] Database Query
  [3] PHP Code
  [4] External Process
 > 4

 Enter command:
 > sh deploy

 Process timeout [600]: #default is 600 seconds, enter to choose default value
 >

 What time to execute (in UTC time, format:Y-m-d H:i:s):
 > 2024-06-01 08:30:35
```

Support me
----------

[](#support-me)

If you find this package helps you, kindly support me by donating some BNB (BSC) to the address below.

```
0x364d8eA5E7a4ce97e89f7b2cb7198d6d5DFe0aCe

```

[![](https://camo.githubusercontent.com/67c5326d8855725c2e2fe63a03bbb2dbd6efed10e1fda2c02c20af0a041a2a72/68747470733a2f2f696e666f2e736f756c646f69742e636f6d2f696d672f77616c6c65742d616464726573732d626e622d6273632e706e67)](https://camo.githubusercontent.com/67c5326d8855725c2e2fe63a03bbb2dbd6efed10e1fda2c02c20af0a041a2a72/68747470733a2f2f696e666f2e736f756c646f69742e636f6d2f696d672f77616c6c65742d616464726573732d626e622d6273632e706e67)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~39 days

Recently: every ~98 days

Total

11

Last Release

316d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/605123f58f21c062a28a90d9db68fc30a26bc4b4016b35cb9787ae4e0c847a40?d=identicon)[syamsoul](/maintainers/syamsoul)

---

Top Contributors

[![syamsoul](https://avatars.githubusercontent.com/u/15118790?v=4)](https://github.com/syamsoul "syamsoul (25 commits)")

---

Tags

phplaraveldatabaseartisanjobcommandactionsouldoitsyamsouldelay

### Embed Badge

![Health badge](/badges/syamsoul-laravel-action-delay/health.svg)

```
[![Health](https://phpackages.com/badges/syamsoul-laravel-action-delay/health.svg)](https://phpackages.com/packages/syamsoul-laravel-action-delay)
```

###  Alternatives

[nwidart/db-exporter

Export your database quickly and easily as a Laravel Migration and all the data as a Seeder class.

37839.1k](/packages/nwidart-db-exporter)[cybercog/laravel-clickhouse

ClickHouse migrations for Laravel

163166.8k](/packages/cybercog-laravel-clickhouse)[laragear/preload

Effortlessly make a Preload script for your Laravel application.

119363.5k](/packages/laragear-preload)[elimuswift/db-exporter

Export your database quickly and easily as a Laravel Migration and all the data as a Seeder class.

364.7k](/packages/elimuswift-db-exporter)[ytake/laravel-couchbase

Couchbase providers for Laravel

3051.9k](/packages/ytake-laravel-couchbase)[calebdw/laravel-sql-entities

Manage SQL entities in Laravel with ease.

301.3k](/packages/calebdw-laravel-sql-entities)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
