Rufus-scheduler variable for time zone - ruby on rails -


I am running a rail application that uses a roof-scheduler to send daily e-mail to all users of noon However, it currently sends it out in the afternoon for the application's time zone "Taipei"

I am capturing the user timezone on signup, but in order to enter a variable in an RUFUS-scheduler function Unable to

  scheduler.cron ('0 15 * * * * @ Time_zone') What is the account. all. What to do Account | Do CODE account.users.each User | DELIVER EMAIL CODE end expiry   

I do not know if I have to define the @time_zone variable so that the rufus can read it properly.

Thanks in advance!

Scheduler does not need to care about timezone, it is better thinking in UTC What you want to do is run your work every hour and only search for accounts where it is currently midnight, then your code looks more than this:

  Scheduler Cron ('0 * * * *') tees = timezone is now part of this account. Where (: timezone => tz). What to do Account | Do CODE account.users.each User | DELIVER EMAIL CODE end-end    

Comments

Popular posts from this blog

php - Creating canonical URLs with custom route-classes -

mysql - Formatting problem with PHP DateTime Difference when used as part of an equation -

Mysql Local server hardware -