Support

Account

Home Forums General Issues Update a field 30 Days after Reply To: Update a field 30 Days after

  • A cronjob based approach would be the best way, store the values in variables and change the variable with code executed by a cronjob, I found a quite extensive thread on Stackoverflow

    Stackoverflow

    To summarise it I quote one of the Threads in case it gets closed

    [shortened quote] The script will only run if you have a cron-job or someone access the page. (and a cron job is basically the computer accessing the page at a specific time!)

    If you want a variable dependant on time of day simply use a if statement

    (pseudo code)

    if(now() < $time){
        $var = 1;
    }else{
        $var = 2;
    }

    This means that anyone who visits the page before $time gets $var1 and after gets $var2

    You will also find an introduction to cronjobs here

    Cron Jobs

    The big question is if you are familiar with cron jobs and if your hosting environment allows them.

    I hope this will put you on the right track!

    Cheers
    Johannes