Best practice forum (Archived)

Audience assignment after Totara Sync

 
??
Audience assignment after Totara Sync
?? 发表于 2014年11月2日 Sunday 17:43
 

Again I am still very new to Totara and hope this question make sense..

I uploaded some new users and have noticed they're not assigning to audiences and thus programs or courses automatically until some time after (say 24 hours).

I reckon it's CRON related, then run the CRON under Home> Site administration> Server> Cron

However, it's still not assigning with a matching audience rule.

I might be missing something here. Anyone knows?

me
Re: Audience assignment after Totara Sync
AngusGeorge 发表于 2014年11月2日 Sunday 18:54
小组 Totara

Hi Mei,

This is the program cron which runs daily, it checks to see if its been run in the past 24 hours so running the cron manually will not trigger it. It is possible to make it run more frequently - but then you may face performance issues.

regards,

George.

??
Re: Audience assignment after Totara Sync
?? 发表于 2014年11月2日 Sunday 19:05
 

I see. Thank you George! Running daily is fine but occasionally will need to manually trigger it for a manual error fix (e.g. fix an error withtin Totara Sync).
Is it a program to be triggered in Totara application or something on the server side? How can I trigger this?

me
Re: Audience assignment after Totara Sync
AngusGeorge 发表于 2014年11月2日 Sunday 19:37
小组 Totara

Hi Mei,

If you look in the code here: totara/program/cron.php

You can change the settings here:

$hourly = 60 * 60; $daily = 60 * 60 * 24; 

cheers,

George.

 

??
Re: Audience assignment after Totara Sync
?? 发表于 2014年11月3日 Monday 14:49
 

Also, something you could bring up to your partner, but one way we get around this is some custom cron scheduling for dynamic audiences and programs. As George mentioned, yes you can customize the program cron to allow it to run more often. In some cases we have taken the route of a custom program cron, same as the existing one, but made it so that we can execute it with a custom cron schedule via the CLI. This way we can target only program cron to execute more often, rather than the whole system cron. In addition to that, you can execute an enrol/cohort/cli script (and schedule with a custom cron job). This cron is what updates dynamic audience membership.

Naturally, as was mentioned, you want to keep performance in mind for running these crons more often. In my experience, the execution of program and cohort/dynamic-audience crons took a small enough amount of time that it seemed acceptable. With that said, scheduling these crons should take into consideration other crons and the master cron schedule, as it is best that they don't run at the same time.

 

??
Re: Audience assignment after Totara Sync
?? 发表于 2014年11月4日 Tuesday 14:59
 

Thank you for all your input on this :)

该论坛帖子已被删除
2014年12月8日 Monday 19:17
该论坛帖子的内容已被删除,无法再访问。
ChuangWen Hao
Re: Audience assignment after Totara Sync
ChuangWen Hao 发表于 2014年12月9日 Tuesday 10:29
 

Hi Maurice,

Did you mean that if one "edit" the audience rule set and "approve changes" (even without any actual changes), this action will automatically trigger that daily Totara sync again? Can you please confirm? Thanks!