mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 10:06:24 +05:00
add timezone support for cron scheduler
This commit is contained in:
committed by
Dan Christian Bogos
parent
adadcd01cb
commit
de448ae11c
@@ -48,7 +48,7 @@ func NewExporterMetrics(schedule, timezone string) (*ExporterMetrics, error) {
|
||||
m.Reset() // init MapStorage with default values
|
||||
|
||||
if schedule != "" {
|
||||
m.cron = cron.New()
|
||||
m.cron = cron.New(cron.WithLocation(loc))
|
||||
if _, err := m.cron.AddFunc(schedule, func() {
|
||||
m.Reset()
|
||||
}); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user