diff --git a/Jenkinsfile b/Jenkinsfile index 60245b20..011d7b3b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -107,10 +107,29 @@ pipeline { steps { script { try { - sh 'docker image prune -a -f' + sh ''' + echo "Starting Docker cleanup..." + + # Remove stopped containers + docker container prune -f + + # Remove unused networks + docker network prune -f + + # Remove unused images + docker image prune -a -f + + # Remove unused build cache + docker builder prune -f + + echo "Docker cleanup completed." + + docker system df + ''' } catch (Exception e) { echo "Error during cleanup: ${e.message}" } + currentBuild.description = 'Step 6 of 6 Completed' } } diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index 74208ee0..26f31fff 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -71,8 +71,12 @@ class Kernel extends ConsoleKernel ->cron('0 1 * * *') ->withoutOverlapping(); + // $schedule->command('invoice-generate-command') + // ->hourly() + // ->withoutOverlapping(); + $schedule->command('invoice-generate-command') - ->hourly() + ->cron('0 0-8,10-11,13-14,16-17,19-23 * * *') ->withoutOverlapping(); $schedule->command('billplz-failed-callback-fix-command')