Skip to content

Commit 6f43558

Browse files
committed
Added cron files copying to workspace crontab
1 parent a1fd2aa commit 6f43558

3 files changed

Lines changed: 18 additions & 0 deletions

File tree

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ It's like Laravel Homestead but for Docker instead of Vagrant.
6060
- [Production](#Production)
6161
- [Setup Laravel and Docker on Digital Ocean](#Digital-Ocean)
6262
- [Misc](#Misc)
63+
- [Cron jobs](#CronJobs)
6364
- [Use custom Domain](#Use-custom-Domain)
6465
- [Enable Global Composer Build Install](#Enable-Global-Composer-Build-Install)
6566
- [Install Prestissimo](#Install-Prestissimo)
@@ -936,6 +937,17 @@ To controll the behavior of xDebug (in the `php-fpm` Container), you can run the
936937

937938

938939
<br>
940+
941+
<a name="CronJobs"></a>
942+
### Adding cron jobs
943+
944+
Add a root file containing the cron jobs in `workspace/crontab`.
945+
946+
```
947+
# workspace/crontab/root
948+
* * * * * root echo "Every Minute" > /var/log/cron.log 2>&1
949+
```
950+
939951
<a name="Use-custom-Domain"></a>
940952
### Use custom Domain (instead of the Docker IP)
941953

workspace/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,12 @@ RUN if [ ${INSTALL_AEROSPIKE_EXTENSION} = false ]; then \
198198
rm /etc/php/7.0/cli/conf.d/aerospike.ini \
199199
;fi
200200

201+
#####################################
202+
# Crontab
203+
#####################################
204+
USER root
205+
COPY ./crontab /var/spool/cron/crontabs
206+
201207
#
202208
#--------------------------------------------------------------------------
203209
# Final Touch

workspace/crontab/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)