Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Register
Sign in
Toggle navigation
Menu
UPSMF
HasuraNodeComponent
Commits
ed4e2e49
Commit
ed4e2e49
authored
1 year ago
by
Reshmi
Browse files
Options
Download
Patches
Plain Diff
Adding a new function in scheduler
parent
49e70c8d
main
UAT
1 merge request
!27
Adding a new function to scheduler
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scheduler.js
+7
-1
scheduler.js
with
7 additions
and
1 deletion
+7
-1
scheduler.js
+
7
−
1
View file @
ed4e2e49
...
...
@@ -117,7 +117,10 @@ const scheduledJob = cron.schedule('0 0 * * *', async () => {
}
}
});
}
catch
(
error
)
{
scheduler2Fun
();
}
catch
(
error
)
{
console
.
log
(
'
Cron job running at 12 AM
'
);
console
.
error
(
'
Error updating status:
'
,
error
.
message
);
}
},
{
...
...
@@ -125,6 +128,9 @@ const scheduledJob = cron.schedule('0 0 * * *', async () => {
timezone
:
'
Asia/Kolkata
'
,
});
const
scheduler2Fun
=
()
=>
{
console
.
log
(
'
Arun...
'
);
};
console
.
log
(
'
Scheduler started. Waiting for scheduled tasks...
'
);
export
default
{
scheduledJob
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets