Skip to content

ybjozee/symfony_scheduler_demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Demo Application on Symfony Scheduler

This application is a factory simulator. In terms of operations, the factory runs six days a week (Monday through Saturday). In addition to Sundays, the factory doesn’t run on Christmas Eve, Christmas, New Year’s Eve, and New Year. On the days which the factory runs, it operates on 4 hour shifts starting at midnight with a 2 hour break between each shift.

To keep track of things, the factory requires reports to be generated. In particular, three reports are required:

  • A production report which is expected at the end of each day
  • An incident report which is expected after every shift
  • A compensation report which is expected on the last day of the month

This application shows how to use the Symfony scheduler to handle the nuances associated with this task.

System Requirements

Installation

  1. Clone the repository
 git clone https://github.com/ybjozee/symfony_scheduler_demo.git
 cd symfony_scheduler_demo
  1. Install dependencies
 composer install
  1. Update DATABASE_URL as required - by default, SQLite is used
DATABASE_URL="sqlite:///%kernel.project_dir%/var/data.db"
  1. Setup database and transports
symfony console doctrine:database:create
symfony console make:migration
symfony console doctrine:migrations:migrate -n
symfony console messenger:setup-transports
symfony console doctrine:fixtures:load -n
  1. Debug schedule
symfony console debug:schedule
  1. Consume async transport
symfony console messenger:consume -v async
  1. Consume scheduler_default transport
symfony console messenger:consume -v scheduler_default

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages