Spaces:
Paused
Paused
T1ckbase commited on
Commit ·
a9fbe0c
1
Parent(s): db0618c
add cron
Browse files
deno.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
{
|
| 2 |
"tasks": {
|
| 3 |
-
"start": "deno --allow-net --allow-read --allow-env --env-file=.env --watch main.ts"
|
| 4 |
},
|
| 5 |
"imports": {
|
| 6 |
"@std/async": "jsr:@std/async@^1.0.12",
|
|
|
|
| 1 |
{
|
| 2 |
"tasks": {
|
| 3 |
+
"start": "deno --allow-net --allow-read --allow-env --env-file=.env --unstable-cron --watch main.ts"
|
| 4 |
},
|
| 5 |
"imports": {
|
| 6 |
"@std/async": "jsr:@std/async@^1.0.12",
|
main.ts
CHANGED
|
@@ -95,3 +95,7 @@ app.get('/game/reset', (c) => {
|
|
| 95 |
});
|
| 96 |
|
| 97 |
Deno.serve(app.fetch);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 95 |
});
|
| 96 |
|
| 97 |
Deno.serve(app.fetch);
|
| 98 |
+
|
| 99 |
+
Deno.cron('keep alive?', '0 0 * * *', async () => {
|
| 100 |
+
await fetch('https://t1ckbase-minesweeper.hf.space');
|
| 101 |
+
});
|