My Wordpress site has a registration field that asks members how many weeks pregnant they are.
If a member insert 5
then 7 days later that integer needs to increase to 6
.
Pseudo code for what I want is:
If mysite_user_weekspregnant > 0
get current_day++
case current_day => 1 and <= 7
set week 1
case current_day > 7 and <= 14
set week 2
...
...
case current_day > 273 and <= 270
set week 40
mysite_user_weekspregnant
is stored within table: wp_usermeta
.
How do I turn this into a CRON job?