(()=>{"use strict";vare,n,o,a={33788(e,n,o){vara=o(21777),r=o(81222),i=o(53334),s=o(85471),l=o(19051),c=o(85168),d=o(51651),A=o(47176),u=o(63814),p=o(32073),E=o(371),g=o(88837);constb=(0,o(35947).YK)().setApp("settings").detectUser().build(),m=(0,r.C)("settings","lastCron"),T=(0,r.C)("settings","cronMaxAge",""),f=(0,r.C)("settings","backgroundJobsMode","cron"),v=(0,r.C)("settings","cliBasedCronPossible",!0),h=(0,r.C)("settings","cliBasedCronUser","www-data"),I=(0,r.C)("settings","backgroundJobsDocUrl"),C={name:"BackgroundJob",components:{NcCheckboxRadioSwitch:p.A,NcSettingsSection:g.A,NcNoteCard:E.A},data:()=>({lastCron:m,cronMaxAge:T,backgroundJobsMode:f,cliBasedCronPossible:v,cliBasedCronUser:h,backgroundJobsDocUrl:I,relativeTime:(0,d.A)(1e3*m).fromNow(),maxAgeRelativeTime:(0,d.A)(1e3*T).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){constn=(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(n,{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:n}){"ok"===e?awaitthis.deleteError():((0,c.Qg)(t),b.error(t,n))},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)}}}},O=C;varL=o(85072),R=o.n(L),y=o(97825),P=o.n(y),N=o(77659),k=o.n(N),S=o(55056),_=o.n(S),D=o(10540),w=o.n(D),x=o(41113),B=o.n(x),M=o(24626),V={};V.styleTagTransform=B(),V.setAttributes=_(),V.insert=k().bind(null,"head"),V.domAPI=P(),V.insertStyleElement=w(),R()(M.A,V),M.A&&M.A.locals&&M.A.locals;varH=o(14486);constj=(0,H.A)(O,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