admin管理员组

文章数量:1415467

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?

本文标签: phpCRON job to update wpusermeta value each day or week based on server time