Uploaded image for project: 'CFEngine Community'
  1. CFEngine Community
  2. CFE-2428

Adding command to crontab using cronjob from stdlib.cf adds more than one line

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Open
    • Priority: Medium
    • Resolution: Unresolved
    • Affects Version/s: 3.7.2
    • Fix Version/s: None
    • Labels:
    • Environment:
      Solaris 10/11, RHEL 5/6/7
      all hardware and VM's

      Description

      When using the cronjob bundle in sdtlib.cf, if you don't match the spaces exactly, it will add another line into the crontab file. This is not good if someone already added the line with more/less spaces between the day-of-week and the actual command. Now we have the command in the crontab file twice.
      The following example shows the first line added by me and then CFEngine added the second line because there are more spaces in the first line of the crontab file:

      5,10 * * * * /usr/local/cron/test.sh
      5,10 * * * * /usr/local/cron/test.sh

        Attachments

          Activity

            People

            • Assignee:
              a10003 Eystein Maloy Stenberg
              Reporter:
              dcorral David Corral
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:

                Summary Panel