We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent acbc666 commit c561fdeCopy full SHA for c561fde
src/jobs/RoleJob.ts
@@ -0,0 +1,11 @@
1
+import RoleService from 'controllers/Role/service'
2
+import cron from 'node-cron'
3
+import ConstRoles from 'constants/ConstRoles'
4
+
5
+// Run this job every 30 minutes
6
+const GetRoleTask = cron.schedule('30 * * * *', async () => {
7
+ const data = await RoleService.getOne(ConstRoles.ID_UMUM)
8
+ console.log('Running task check get role by id', { data })
9
+})
10
11
+export { GetRoleTask }
0 commit comments