Skip to content

Running a PHP-Script with a cronjob inside a Docker container

Notifications You must be signed in to change notification settings

tecycloud/docker-compose-phpcron

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

docker-compose-phpcron

Running a PHP-Script with a cronjob inside a Docker container

Start:
$ docker-compose build
$ docker-compose up -d

The scheduler is started every 10min. This means that the cron.php is started every 10min.

$ docker exec -it docker-compose-cron_phpcron_1 cat /var/log/schedule.log

Example Output:

Datum / Uhrzeit: 06.02.2021 21:50
Datum / Uhrzeit: 06.02.2021 22:00
Datum / Uhrzeit: 06.02.2021 22:10
Datum / Uhrzeit: 06.02.2021 22:20
Datum / Uhrzeit: 06.02.2021 22:30
Datum / Uhrzeit: 06.02.2021 22:40

About

Running a PHP-Script with a cronjob inside a Docker container

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published