added cron for disposable email check
This commit is contained in:
24
indisposableCron.php
Normal file
24
indisposableCron.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
// Adjust this path if your file location is different
|
||||
require __DIR__ . '/vendor/autoload.php';
|
||||
|
||||
// Bootstrap the Laravel application
|
||||
$app = require_once __DIR__ . '/bootstrap/app.php';
|
||||
|
||||
// Make the Console Kernel instance
|
||||
$kernel = $app->make(Illuminate\Contracts\Console\Kernel::class);
|
||||
|
||||
try {
|
||||
// Run the Artisan command 'ping'
|
||||
$exitCode = $kernel->call('disposable:update');
|
||||
|
||||
// Get the output of the command
|
||||
$output = $kernel->output();
|
||||
|
||||
echo "Artisan command 'schedule:run' executed successfully. Exit code: $exitCode\n";
|
||||
echo "Output:\n$output";
|
||||
|
||||
} catch (\Exception $e) {
|
||||
echo "Error running Artisan command: " . $e->getMessage();
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user