Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
run cron every day at midnight
Browse files
server.js
CHANGED
@@ -32,7 +32,9 @@ cron.schedule("0 * * * *", async () => {
|
|
32 |
console.info(response?.message)
|
33 |
});
|
34 |
|
35 |
-
cron.schedule(
|
|
|
|
|
36 |
console.log('Updating models')
|
37 |
const first_space_host = process.env.SPACE_HOST?.split(',')[0] ?? process.env.SPACE_HOST
|
38 |
const request = await fetch(`http://${first_space_host}/api/models`, {
|
|
|
32 |
console.info(response?.message)
|
33 |
});
|
34 |
|
35 |
+
cron.schedule(
|
36 |
+
"0 0 * * *"
|
37 |
+
, async () => {
|
38 |
console.log('Updating models')
|
39 |
const first_space_host = process.env.SPACE_HOST?.split(',')[0] ?? process.env.SPACE_HOST
|
40 |
const request = await fetch(`http://${first_space_host}/api/models`, {
|