Jump to content

Task time options


-RAW-

Recommended Posts

Posted

Posted on the other forum this question but no luck from other devs, so ill ask here.

On 3.4 we could set up a task to run for example sundays, can it be done on 4.1 or is there anyway i can work around to do this ?

Posted

What you could do, if the day of week actually matters, is set it to run once a day and check manually in the code.

However, there's the problem of locale affecting the actual day names, so the only way to get a solid check after digging seems to be something like:

$dayOfWeek = \jddayofweek( \unixtojd( ) );
if($dayOfWeek === 0)
{
//it's sunday.
}

please note, this is untested, just what I was able to find digging through the php manual looking for a way to determine the day of the week without the locale coming into play.

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...