Covivo/mobicoop

View on GitHub
api/scripts/cron-file.txt

Summary

Maintainability
Test Coverage
# Copyright (c) 2020, MOBICOOP. All rights reserved.
# This project is dual licensed under AGPL and proprietary licence.
# #######################################
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.

# You should have received a copy of the GNU Affero General Public License
# along with this program.  If not, see <gnu.org/licenses>.
# #######################################
# Licence MOBICOOP described in the file
# LICENSE
# #######################################

# CRON JOBS
# All the jobs here are installed using a python script (/scripts/updateCrontab.py)
# Parameters used in the python script :
# $php => the php binary path
# $console => the symfony api console path
# $env => the environment (dev / test / prod)

# each 5 minutes : link addresses and directions to territories
# */5 * * * *    $php $console app:geography:territory-link-batch --env=$env

# each day at 1am : create and send the carpool proofs for the day before
0 1 * * *   $php $console app:carpool:proof-batch --env=$env

# each day at 2am : create the payment export
# 0 2 * * *   $php $console app:payment:export-batch --env=$env

# each day at 2am : create the carpool items for the payment and/or export
0 2 * * * $php $console app:carpool:item-batch --env=$env

# each day at 4am : create the journeys
0 4 * * * $php $console app:journey:hydrate --env=$env

# each day at 3am : import events from provider
0 3 * * * $php $console app:events:import --env=$env

# each day at 12pm : send carpool ad renewal
0 12 * * * $php $console app:carpool-ad-renewal --env=$env

# each day at 5 am : check and update if needed paymentProfiles
0 5 * * * $php $console app:payment-profile:check-batch --env=$env

# each day at 8 am : check if the address territories linker is still running and if the lock file is too old
0 8 * * * $php $console app:geography:check-running-territory-link-new-addresses 1 --env=$env

# every minutes : check if there is carpoolPayment/carpoolItem to update
*/1 * * * * $php $console app:payment:fullfill-carpool-payments --env=$env