PHP code example of schubu / cronify

1. Go to this page and download the library: Download schubu/cronify library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

schubu / cronify example snippets

 php
php artisan cronify:install
 php
php artisan migrate
 php
$post = Post::create([
    "title"=>"Your title", 
    "body" => "Lorem ipsum"
]);

$post->crons()->create([
    'pattern' => '* * 1 1 *'
]);
 php
App\Models\Post::latest()->first()->isDue()
 php
['cron' => ['array', new CronPatternRule]]
array: new CronPatternArrayRule