I have created some schedulers using following Link.
https://developer.atlassian.com/server/framework/atlassian-sdk/scheduling-events-via-sal-tutorial/
Now I need to run it one of it every Midnight, one every Monday and one to every Month end . how we can set the scheduler interval to 1 week. or one month I want my scheduler to run every Monday or every month end .
please give me some suggestion on how we can set the scheduler interval to 1 week. or one month or month .
Thanks !!
@nehain that case I'd suggest to separate these three as they cannot be formed as one cron expression.
You mind find these docs useful: https://docs.atlassian.com/atlassian-scheduler-api/1.5.1/atlassian-scheduler-api/apidocs/com/atlassian/scheduler/config/Schedule.html
Hi Maciej,
Thanks for the reply. I successfully created the jobs and they are running okay .
I am also creating a user session which has approval and browse rights for all the teams .
I'm getting some exception . I made a scheduler to send emails to all company users if they have unreported hours. Sometimes its working completely okay and some times its giving me error of 401 as my scheduler is making bad request when making rest call for getting required hours and time sheet status for a user.
In logs I tried to print the request and respective response which is following:
Error occurs when request is :GET localhost/rest/tempo-timesheets/3/timesheet-approval/approval-statuses?&username=neha&periodStartDate=2018-03-01 HTTP/1.1
2018-04-07 13:00:00,329 Caesium-1-1 DEBUG ServiceRunner [c.f.d.integration.api.AbstractHttpClient]
Error occurs when response headers is :
HTTP/1.1 400 mode=block, X-Content-Type-Options: nosniff, X-Frame-Options: SAMEORIGIN, Content-Security-Policy: frame-ancestors 'self', X-Seraph-LoginReason: OK, X-AUSERNAME: lsoufek, Cache-Control: no-cache, no-store, no-transform, Content-Type: application/json;charset=UTF-8, Connection: close, Transfer-Encoding: chunked]
ServiceRunner [c.f.dta.integration.SendEmailToEmployeesImpl] java.lang.RuntimeException: Http response status is: 400
when i am checking the request from postman its working fine with this user but in my test server its giving this .
Is X-AUSERNAME response header value should be the name of the logged in user? because its coming different , and in my postman req the x-ausername is coming as logged in user .
But I also have no idea why X-AUSERNAME is coming different.
Thanks !
Neha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.