{"id":19111249,"url":"https://github.com/callicoder/spring-boot-quartz-scheduler-email-scheduling","last_synced_at":"2025-04-06T08:13:46.332Z","repository":{"id":41165456,"uuid":"147180334","full_name":"callicoder/spring-boot-quartz-scheduler-email-scheduling","owner":"callicoder","description":"Spring Boot Quartz Scheduler Example that schedules Emails to be sent at a later time.","archived":false,"fork":false,"pushed_at":"2024-06-14T10:05:40.000Z","size":58,"stargazers_count":163,"open_issues_count":2,"forks_count":190,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-30T06:07:26.963Z","etag":null,"topics":["quartz","quartz-scheduler","schedule-jobs","schedule-tasks","scheduler","spring","spring-boot"],"latest_commit_sha":null,"homepage":"https://www.callicoder.com/spring-boot-quartz-scheduler-email-scheduling-example/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/callicoder.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-09-03T09:13:19.000Z","updated_at":"2025-03-28T04:38:56.000Z","dependencies_parsed_at":"2024-12-31T14:47:33.513Z","dependency_job_id":null,"html_url":"https://github.com/callicoder/spring-boot-quartz-scheduler-email-scheduling","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/callicoder%2Fspring-boot-quartz-scheduler-email-scheduling","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/callicoder%2Fspring-boot-quartz-scheduler-email-scheduling/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/callicoder%2Fspring-boot-quartz-scheduler-email-scheduling/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/callicoder%2Fspring-boot-quartz-scheduler-email-scheduling/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/callicoder","download_url":"https://codeload.github.com/callicoder/spring-boot-quartz-scheduler-email-scheduling/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247451665,"owners_count":20940944,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["quartz","quartz-scheduler","schedule-jobs","schedule-tasks","scheduler","spring","spring-boot"],"created_at":"2024-11-09T04:27:46.758Z","updated_at":"2025-04-06T08:13:46.305Z","avatar_url":"https://github.com/callicoder.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spring Boot Quartz Scheduler Example: Building an Email Scheduling app\n\n**Complete Tutorial:** https://www.callicoder.com/spring-boot-quartz-scheduler-email-scheduling-example/\n\n## Requirements\n\n1. Java - 11\n\n2. Maven - 3.x.x\n\n3. MySQL - 5.x.x\n\n## Steps to Setup\n\n**1. Clone the application**\n\n```bash\ngit clone https://github.com/callicoder/spring-boot-mysql-rest-api-tutorial.git\n```\n\n**2. Create MySQL database**\n\n```bash\ncreate database quartz_demo\n```\n\n**3. Change MySQL username and password as per your MySQL installation**\n\nopen `src/main/resources/application.properties`, and change `spring.datasource.username` and `spring.datasource.password` properties as per your mysql installation\n\n\n**4. Setup Spring Mail**\n\nThe project is using Gmail's SMTP server for sending emails. Whether you use Gmail or any other SMTP server, you'll need to configure the following mail properties accordingly -\n\n```properties\nspring.mail.host=smtp.gmail.com\nspring.mail.port=587\nspring.mail.username=rajeevc217@gmail.com\nspring.mail.password=\n```\n\nIf you're using Gmail, you need to allow the third party apps to send emails by following the instructions below -\n\n+ Go to https://myaccount.google.com/security?pli=1#connectedapps\n+ Set ‘Allow less secure apps’ to YES\n\n**5. Create Quartz Tables**\n\nThe project stores all the scheduled Jobs in MySQL database. You'll need to create the tables that Quartz uses to store Jobs and other job-related data. Please create Quartz specific tables by executing the `quartz_tables.sql` script located inside `src/main/resources` directory.\n\n```bash\nmysql\u003e source \u003cPATH_TO_QUARTZ_TABLES.sql\u003e\n```\n\n**6. Build and run the app using maven**\n\nFinally, You can run the app by typing the following command from the root directory of the project -\n\n```bash\nmvn spring-boot:run\n```\n\n## Scheduling an Email using the /scheduleEmail API\n\n```bash\ncurl -i -H \"Content-Type: application/json\" -X POST \\\n-d '{\"email\":\"callicoder@gmail.com\",\"subject\":\"Things I wanna say to my Future self\",\"body\":\"Dear Future me, \u003cbr\u003e\u003cbr\u003e \u003cb\u003eThink Big And Don’t Listen To People Who Tell You It Can’t Be Done. Life’s Too Short To Think Small.\u003c/b\u003e \u003cbr\u003e\u003cbr\u003e Cheers, \u003cbr\u003eRajeev!\",\"dateTime\":\"2018-09-04T16:15:00\",\"timeZone\":\"Asia/Kolkata\"}' \\\nhttp://localhost:8080/scheduleEmail\n\n# Output\n{\"success\":true,\"jobId\":\"0741eafc-0627-446f-9eaf-26f5d6b29ec2\",\"jobGroup\":\"email-jobs\",\"message\":\"Email Scheduled Successfully!\"}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcallicoder%2Fspring-boot-quartz-scheduler-email-scheduling","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcallicoder%2Fspring-boot-quartz-scheduler-email-scheduling","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcallicoder%2Fspring-boot-quartz-scheduler-email-scheduling/lists"}