(()=>{"use strict";vare,o,n,a={41399(e,o,n){vara=n(21777),r=n(81222),s=n(53334),i=n(85471),l=n(19051),c=n(85168),d=n(51651),A=n(68149),u=n(63814),E=n(32073),g=n(371),p=n(88837);constb=(0,n(35947).YK)().setApp("settings").detectUser().build(),T=(0,r.C)("settings","lastCron"),m=(0,r.C)("settings","cronMaxAge",""),I=(0,r.C)("settings","backgroundJobsMode","cron"),v=(0,r.C)("settings","cliBasedCronPossible",!0),f=(0,r.C)("settings","cliBasedCronUser","www-data"),h=(0,r.C)("settings","backgroundJobsDocUrl"),O={name:"BackgroundJob",components:{NcCheckboxRadioSwitch:E.A,NcSettingsSection:p.A,NcNoteCard:g.A},data:()=>({lastCron:T,cronMaxAge:m,backgroundJobsMode:I,cliBasedCronPossible:v,cliBasedCronUser:f,backgroundJobsDocUrl:h,relativeTime:(0,d.A)(1e3*T).fromNow(),maxAgeRelativeTime:(0,d.A)(1e3*m).fromNow()}),computed:{cronLabel(){lete=t("settings","Use system cron service to call the cron.php file every 5 minutes.");returnthis.cliBasedCronPossible?e+="<br>"+t("settings",'The cron.php needs to be executed by the system account "{user}".',{user:this.cliBasedCronUser}):e+="<br>"+t("settings","The PHP POSIX extension is required. See {linkstart}PHP documentation{linkend} for more details.",{linkstart:'<a target="_blank" rel="noreferrer nofollow" class="external" href="https://www.php.net/manual/en/book.posix.php">',linkend:"</a>"},void0,{escape:!1}),e},oldExecution(){returnDate.now()/1e3-this.lastCron>600},longExecutionNotCron(){returnDate.now()/1e3-this.cronMaxAge>43200&&"cron"!==this.backgroundJobsMode},longExecutionCron(){returnDate.now()/1e3-this.cronMaxAge>86400&&"cron"===this.backgroundJobsMode}},methods:{asynconBackgroundJobModeChanged(e){consto=(0,u.KT)("/apps/provisioning_api/api/v1/config/apps/{appId}/{key}",{appId:"core",key:"backgroundjobs_mode"});await(0,A.C5)();try{const{data:t}=awaitl.Ay.post(o,{value:e});this.handleResponse({status:t.ocs?.meta?.status})}catch(e){this.handleResponse({errorMessage:t("settings","Unable to update background job mode"),error:e})}},asynchandleResponse({status:e,errorMessage:t,error:o}){"ok"===e?awaitthis.deleteError():((0,c.Qg)(t),b.error(t,o))},asyncdeleteError(){conste=(0,u.KT)("/apps/provisioning_api/api/v1/config/apps/{appId}/{key}",{appId:"core",key:"cronErrors"});await(0,A.C5)();try{awaitl.Ay.delete(e)}catch(e){b.error(e)}}}},L=O;varC=n(85072),R=n.n(C),N=n(97825),y=n.n(N),P=n(77659),S=n.n(P),_=n(55056),D=n.n(_),k=n(10540),B=n.n(k),w=n(41113),x=n.n(w),M=n(24626),V={};V.styleTagTransform=x(),V.setAttributes=D(),V.insert=S().bind(null,"head"),V.domAPI=y(),V.insertStyleElement=B(),R()(M.A,V),M.A&&M.A.locals&&M.A.locals;varH=n(14486);constj=(0,H.A)(L,function(){vare=this,t=e._self._c;returnt("NcSettingsSection",{attrs:{name:e.t("settings","Background jobs"),description:e.t("settings","For the server to work properly, it's important to configure background jobs correctly. Cron is the recommended setting. Please see the documentation for more information."),"doc-url":e.backgroundJobsDocUrl}},[0!==e.lastCron?[e.oldExecution?t("NcNoteCard",{attrs:{type:"error"}},[e._v("\n\t\t\t"+e._s(e.t("settings","Last job execution ran {time}. Something seems wrong.",{time:e.relativeTime}))+"\n\t\t")]):e.longExecutionCron?t("NcNoteCard",{attrs:{type:"warning"}},[e._v("\n\t\t\t"+e._s(e.t("settings","Some jobs have not been executed since {maxAgeRelativeTime}. Please consider increasing the execution frequency.",{maxAgeRelativeTime:e.maxAgeRelativeTime}))+"\n\t\t")]):e.longExecutionNotCron?t("NcNoteCard",{attrs:{type:"warning"}},[e._v("\n\t\t\t"+e._s(e.t("settings","Some jobs have not been executed since {maxAgeRelativeTime}. Please consider switching to system cron.",{maxAgeRelativeTime:e.maxAgeRelativeTime}))+"\n\t\t")]):t("NcNoteCard",{attrs:{type:"success"}},[e._v("\n\t\t\t"+e._s(e.t("settings","Last job ran {relativeTime}.",{relativeTime:e.relativeTime}))+"\n\t\t")])]:t("NcNoteCard",{attrs:{type:"error"}},[e._v("\n\t\t"+e._s(e.t("settings","Background job did not run yet!"))+"\n\t")]),e._v(" "),t("NcCheckboxRadioSwitch",{staticClass:"ajaxSwitch",attrs:{type:"radio",name:"backgrou