Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mytime
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Narendar Vakiti
mytime
Commits
f734b5f6
Commit
f734b5f6
authored
May 29, 2019
by
Vijay Akula
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Provided options for cron expressions in LeaveMailNotification
parent
5f63bed4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
LeaveNotificationScheduler.java
...om/nisum/myteam/schedular/LeaveNotificationScheduler.java
+9
-1
No files found.
src/main/java/com/nisum/myteam/schedular/LeaveNotificationScheduler.java
View file @
f734b5f6
...
@@ -36,6 +36,7 @@ public class LeaveNotificationScheduler {
...
@@ -36,6 +36,7 @@ public class LeaveNotificationScheduler {
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
LeaveNotificationScheduler
.
class
);
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
LeaveNotificationScheduler
.
class
);
private
static
final
DateTimeFormatter
dateTimeFormatter
=
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
);
private
static
final
DateTimeFormatter
dateTimeFormatter
=
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
);
@Autowired
@Autowired
private
IMailService
mailService
;
private
IMailService
mailService
;
...
@@ -52,7 +53,14 @@ public class LeaveNotificationScheduler {
...
@@ -52,7 +53,14 @@ public class LeaveNotificationScheduler {
private
IFunctionalGroupService
functionalGroupService
;
private
IFunctionalGroupService
functionalGroupService
;
//@Scheduled(cron = "0 * * * * ?")
private
final
String
SHIFT1_CRON_EXP
=
environment
.
getProperty
(
"email.leave.notification.shift1.cron"
);
private
final
String
SHIFT2_CRON_EXP
=
environment
.
getProperty
(
"email.leave.notification.shift2.cron"
);
private
final
String
SHIFT3_CRON_EXP
=
environment
.
getProperty
(
"email.leave.notification.shift3.cron"
);
private
final
String
SHIFT4_CRON_EXP
=
environment
.
getProperty
(
"email.leave.notification.shift4.cron"
);
private
final
String
SHIFT5_CRON_EXP
=
environment
.
getProperty
(
"email.leave.notification.shift5.cron"
);
//@Scheduled(cron = "0 * * * * ?")
@Scheduled
(
cron
=
"00 00 15 * * 1-5"
)
@Scheduled
(
cron
=
"00 00 15 * * 1-5"
)
public
void
scheduleLeaveMailForShift1Empls
()
throws
IOException
,
MessagingException
,
MyTeamException
{
public
void
scheduleLeaveMailForShift1Empls
()
throws
IOException
,
MessagingException
,
MyTeamException
{
//Shift 1(9:00 AM - 6:00 PM)
//Shift 1(9:00 AM - 6:00 PM)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment