Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-54039

Calendar plugin: Future scheduled jobs not showing up

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • calendar-view-plugin
    • None
    • Jenkins 2.121.3, Calendar View 0.3.1

      Just installed calendar plugin.  Generally nice.  It mentions it's supposed to show future scheduled jobs with some kind of grey outline.  We don't see anything at all.  These are not "pipeline" jobs but just ordinary Jenkins jobs running on cron schedule, some fixed, some using the 'H' for minute.  If there's any debugging info I can provide, just let me know.

          [JENKINS-54039] Calendar plugin: Future scheduled jobs not showing up

          Much of what I wrote in the other ticket (JENKINS-54037) also applies here.

          In addition it would be helpful to know the exact cron expression that you're using. 

          Sven Schoenung added a comment - Much of what I wrote in the other ticket ( JENKINS-54037 ) also applies here. In addition it would be helpful to know the exact cron expression that you're using. 

          Adrian Robert added a comment -

          Cron for jobs NOT showing up:

           

              00 22 * * *

              05 22 * * *

           

          Cron for other jobs that DO show up:

           

              30 00 * * *

              30 03 * * *

           

          The ones NOT showing up take place before midnight, the ones that DO show up after.  Could that be making the difference?

           

          Adrian Robert added a comment - Cron for jobs NOT showing up:       00 22 * * *     05 22 * * *   Cron for other jobs that DO show up:       30 00 * * *     30 03 * * *   The ones NOT showing up take place before midnight, the ones that DO show up after.  Could that be making the difference?  

          The ones NOT showing up take place before midnight, the ones that DO show up after.  Could that be making the difference?

          I doubt it, but that's easy to test. Just change the cron expression of a job that does show up and see if it disappears from the calendar.

          Since it's working for some jobs and not for others, there has to be some kind of difference between the jobs. Unless I know that difference, I can't reproduce the problem and fix it.

          One way of figuring that out would be to create an empty Free Style Project with nothing in it but a cron expression. That should show up in the calendar. Then, step by step, adjust that project to match a job that doesn't show up in the calendar. At some point the project should disappear from the calendar and we know what the difference is.

          Sven Schoenung added a comment - The ones NOT showing up take place before midnight, the ones that DO show up after.  Could that be making the difference? I doubt it, but that's easy to test. Just change the cron expression of a job that does show up and see if it disappears from the calendar. Since it's working for some jobs and not for others, there has to be some kind of difference between the jobs. Unless I know that difference, I can't reproduce the problem and fix it. One way of figuring that out would be to create an empty Free Style Project with nothing in it but a cron expression. That should show up in the calendar. Then, step by step, adjust that project to match a job that doesn't show up in the calendar. At some point the project should disappear from the calendar and we know what the difference is.

          Adrian Robert added a comment - - edited

          Ok thanks, I just tried this.  What makes the difference is actually just the cron expressions I showed above.  '00 22 * * *' won't show up as a scheduled job (though if I run it manually, it does so).  '30 00 * * *' does show up.

          I believe the problem is connected to timezone handling.  We have the Jenkins timezone set to Europe/Helsinki (although the Unix server itself is in UTC).  The Jobs calendar displays in UTC for some reason, and when it comes to a job at 22:30, it gets confused about the day it is running on and ends up displaying it nowhere.  It might be that more care has to be taken when converting between timezones and dates.  It would be nice also if the display used the Jenkins configured timezone.

           

           

          Adrian Robert added a comment - - edited Ok thanks, I just tried this.  What makes the difference is actually just the cron expressions I showed above.  '00 22 * * * ' won't show up as a scheduled job (though if I run it manually, it does so).  '30 00 * * *' does show up. I believe the problem is connected to timezone handling.  We have the Jenkins timezone set to Europe/Helsinki (although the Unix server itself is in UTC).  The Jobs calendar displays in UTC for some reason, and when it comes to a job at 22:30, it gets confused about the day it is running on and ends up displaying it nowhere.  It might be that more care has to be taken when converting between timezones and dates.  It would be nice also if the display used the Jenkins configured timezone.    

          I think that was the missing piece of information. Thanks so much investigating this! I'll look into it.

          Sven Schoenung added a comment - I think that was the missing piece of information. Thanks so much investigating this! I'll look into it.

          Roland Asmann added a comment -

          Sorry for the long silence. I've taken over this plugin last year, but hadn't gotten around to checking all issues.
          Is this still an issue with the current Jenkins+Plugin?

          Roland Asmann added a comment - Sorry for the long silence. I've taken over this plugin last year, but hadn't gotten around to checking all issues. Is this still an issue with the current Jenkins+Plugin?

            malice00 Roland Asmann
            arobert Adrian Robert
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: