PHP code example of idealistsoft / framework-cron

1. Go to this page and download the library: Download idealistsoft/framework-cron 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/ */

    

idealistsoft / framework-cron example snippets


   'console' => [
      // ...
      'commands' => [
         // ...
         'Infuse\Cron\Console\RunScheduledCommand'
      ]
   ]
   

   'modules' => [
      'migrations' => [
         // ...
         'Cron'
      ],
      'migrationPaths' => [
         // ...
         'Cron' => 'vendor/infuse/cron/src/migrations'
      ]
   ]
   

   'cron' => [
      [
         'id' => 'users:cleanup',
         'class' => 'App\Users\ScheduledJobs\Cleanup',
         'minute' => 0,
         'hour' => 0,
         'expires' => 60,
         'successUrl' => 'https://webhook.example.com'
      ],
      [
         'id' => 'orgs:bill',
         'class' => 'App\Billing\ScheduledJobs\Bill'
      ]
   ]
   

'cronSubscribers' => [
    'App\EventSubscribers\MySubscriber'
]