mirror of
https://gitlab.dit.htwk-leipzig.de/htwk-software/htwkalender.git
synced 2025-08-02 17:59:14 +02:00
fix:#52 schedule and ss html link
This commit is contained in:
@@ -17,7 +17,7 @@ func AddSchedules(app *pocketbase.PocketBase) {
|
||||
// Every hour update all courses (5 segments - minute, hour, day, month, weekday) "0 * * * *"
|
||||
// Every three hours update all courses (5 segments - minute, hour, day, month, weekday) "0 */3 * * *"
|
||||
// Every 10 minutes update all courses (5 segments - minute, hour, day, month, weekday) "*/10 * * * *"
|
||||
scheduler.MustAdd("updateCourse", "*/10 * * * *", func() {
|
||||
scheduler.MustAdd("updateCourse", "0 */3 * * *", func() {
|
||||
course.UpdateCourse(app)
|
||||
})
|
||||
|
||||
|
@@ -31,7 +31,7 @@ func FetchAllEventsAndSave(app *pocketbase.PocketBase) (error, []model.Event) {
|
||||
var events []model.Event
|
||||
|
||||
if (time.Now().Month() >= 3) && (time.Now().Month() <= 10) {
|
||||
url := "https://stundenplan.htwk-leipzig.de/ws/Berichte/Text-Listen;Veranstaltungsarten;name;Vp%0AVw%0AV%0ASp%0ASw%0AS%0APp%0APw%0AP%0AZV%0ATut%0ASperr%0Apf%0Awpf%0Afak%0A%0A?&template=sws_modul&weeks=1-65&combined=yes"
|
||||
url := "https://stundenplan.htwk-leipzig.de/ss/Berichte/Text-Listen;Veranstaltungsarten;name;Vp%0AVw%0AV%0ASp%0ASw%0AS%0APp%0APw%0AP%0AZV%0ATut%0ASperr%0Apf%0Awpf%0Afak%0A%0A?&template=sws_modul&weeks=1-65&combined=yes"
|
||||
events, err = parseEventForOneSemester(url)
|
||||
savedEvents, dbError := db.SaveEvents(events, app)
|
||||
err = dbError
|
||||
|
Reference in New Issue
Block a user