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 8229745
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T16:54:12+00:00 2026-06-07T16:54:12+00:00

I am trying to setup a cron job in my Grails web application using

  • 0

I am trying to setup a cron job in my Grails web application using the Quartz plugin. I am currently simply trying to get a test job to execute once every second using the following code:

class TestJob {
    private int counter = 0
    static triggers = {
        simple repeatInterval: 1000
    }

    def execute() {
        // execute job
        counter += 1
        System.out.println("Testing the cron " + counter)
    }
}

However, when I run the application I only see the initial output of the first execute() call twice: once immediately before I am alerted that the server is running, and once immediately after.

| Loading Grails 2.1.0
| Configuring classpath.
| Environment set to development.....
| Packaging Grails application.....
| Compiling 1 source files.....
| Running Grails application
Testing the cron 1
| Server running. Browse to http://localhost:8080/QuartzTest
Testing the cron 1

Does anyone know why my Quartz job might not be firing correctly? I have tried using a cron instead of simple as well as using varying parameters, time intervals, etc. Nothing has made a difference.

Thanks

  • 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-06-07T16:54:15+00:00Added an answer on June 7, 2026 at 4:54 pm

    I think I had similar issues. You are not allowed to use System.out.println from within a quartz-job. Try to use log.error.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to setup an end-of-day automated email using a CRON job. I
I am trying to setup a CRON job using PHP, but am not having
I'm trying to setup the application server part of C2DM push messaging using this
I'm trying to setup a cron job which regularly poles my Facebook notification RSS
I'm trying to setup a PHP file as a cron job, where that PHP
I am trying to learn how to do my first cron job using CodeIgniter.
I'm trying to setup a PHP file as a cron job, where that PHP
I'm trying setup a subset of boost and get it properly compiled using bjam,
Trying to setup and get going with the RestKit library for a cocoa project
I have been trying to setup git for our web development team unsuccessfully. Some

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.