Skip to the content.

Youth Age-Up Command

This guide explains the age_up_members CakePHP CLI command that automatically transitions youth member accounts to adult status when they reach age 18.


🎯 Purpose


🧱 Prerequisites

  1. Accurate birth_month / birth_year values populated for youth members.
  2. Member statuses maintained via the constants in \App\Model\Entity\Member.
  3. CLI user with permission to write app/logs/ and execute Cake commands.

πŸš€ Running the Command

Manual Execution

# Dry run – review changes without persisting them
bin/cake age_up_members --dry-run

# Execute transition and save updates
bin/cake age_up_members

Using the Generic Cron Wrapper

bash /home/vscribe/cronJobScripts/runCakeCommand.sh \
  --workdir /home/vscribe/amp-prod.ansteorra.org \
  age_up_members

Add --dry-run or --php-bin options to the wrapper as needed.

Cron Example (DreamHost Style)

0 2 * * * /usr/bin/setlock -n /tmp/cronlock.vscribe-AMP_UAT_AgeUp \
  sh -c 'bash /home/vscribe/cronJobScripts/runCakeCommand.sh \
    --workdir /home/vscribe/amp-uat.ansteorra.org \
    age_up_members --dry-run'

πŸ“Š Output Summary


πŸ” Troubleshooting Tips