Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7670057
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T15:44:07+00:00 2026-05-31T15:44:07+00:00

I am just starting to learn Quartz scheduling and in the first step of

  • 0

I am just starting to learn Quartz scheduling and in the first step of it I am facing problems.
I am looking at the examples of it on its main website but when I am trying to develop it in my workspace it is giving me errors.

package testing.quartz.scheduler;

    import java.util.Date;
    import java.util.logging.Logger;

    import org.quartz.JobDetail;
    import org.quartz.Scheduler;
    import org.quartz.SchedulerFactory;
    import org.quartz.Trigger;
    import org.quartz.impl.StdSchedulerFactory;

    public class TesterMain {

        /**
         * @param args
         */
         public void run() throws Exception {


                // First we must get a reference to a scheduler
                SchedulerFactory sf = new StdSchedulerFactory();
                Scheduler sched = sf.getScheduler();


                // computer a time that is on the next round minute
                Date runTime = evenMinuteDate(new Date());<--Here its giving me error


                // define the job and tie it to our HelloJob class
                JobDetail job = newJob(HelloJob.class)<--Here its giving me error
                    .withIdentity("job1", "group1")
                    .build();

                // Trigger the job to run on the next round minute
                Trigger trigger = newTrigger()<--Here its giving me error
                    .withIdentity("trigger1", "group1")
                    .startAt(runTime)
                    .build();

                // Tell quartz to schedule the job using our trigger
                sched.scheduleJob(job, trigger);

                // Start up the scheduler (nothing can actually run until the 
                // scheduler has been started)
                sched.start();


                // wait long enough so that the scheduler as an opportunity to 
                // run the job!
                try {
                    // wait 65 seconds to show job
                    Thread.sleep(65L * 1000L); 
                    // executing...
                } catch (Exception e) {
                }

                // shut down the scheduler
                sched.shutdown(true);
            }

            public static void main(String[] args) throws Exception {

               TesterMain example = new TesterMain();
                example.run();

            }

    }

I have specified places where its giving me compilation error. Telling these method is not there in your class.
So I am wondering are these methods really valid (newTrigger, newJob, evenMinuteDate).
I am totally confused. I have added all the jars which is required.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T15:44:08+00:00Added an answer on May 31, 2026 at 3:44 pm

    It doesn’t compile, because you forgot to import the right classes.
    This probably fixes it:

    import static org.quartz.DateBuilder.*;
    import static org.quartz.JobBuilder.*;
    import static org.quartz.TriggerBuilder.*;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm just starting to learn about Quartz Composer and the first thing I would
i'm just starting to learn about database design. For my first project I made
I am just starting to learn Python, but I have already run into some
I am just starting to learn F#. In several F# coding examples I see
I am just starting to learn Ruby (to eventually move to RoR), but I
I'm just starting to learn web dev, but got myself a bit confused when
I'm just starting to learn to use HashMap and reading the java tutorial, but
I'm just starting to learn Android development and writing my first app. I started
I am just starting learn SQL at work, but I am having trouble with
Just starting to learn ASP.NET (C#) and I am using Visual Studio 2008. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.