mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 13:03:50 +00:00
4.6.7 first pr (#726)
This commit is contained in:
6
packages/service/common/system/cron.ts
Normal file
6
packages/service/common/system/cron.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import nodeCron from 'node-cron';
|
||||
|
||||
export const setCron = (time: string, cb: () => void) => {
|
||||
// second minute hour day month week
|
||||
return nodeCron.schedule(time, cb);
|
||||
};
|
@@ -49,6 +49,7 @@ export const addLog = {
|
||||
},
|
||||
error(msg: string, error?: any) {
|
||||
this.log('error', msg, {
|
||||
message: error?.message,
|
||||
stack: error?.stack,
|
||||
...(error?.config && {
|
||||
config: {
|
||||
|
Reference in New Issue
Block a user