You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
347 B

  1. // Copyright 2014 The Gogs Authors. All rights reserved.
  2. // Use of this source code is governed by a MIT-style
  3. // license that can be found in the LICENSE file.
  4. package cron
  5. import (
  6. "github.com/robfig/cron"
  7. "github.com/gogits/gogs/models"
  8. )
  9. func NewCronContext() {
  10. c := cron.New()
  11. c.AddFunc("@every 1h", models.MirrorUpdate)
  12. c.Start()
  13. }