Announcement

Collapse
No announcement yet.

KCron - Problem -- Scheduled Job

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    KCron - Problem -- Scheduled Job

    I have developed a simple backup bash script which runs fine in CLI. I have converted it into an executable in /usr/local/bin. Additionally, I have scheduled it in KCron. The job is showing as enabled. However it will not run either on schedule or by trying to induce it to run immediately in KCron. I'm attaching the actual bash job for reference.

    Any ideas?

    Code:
    #!/bin/bash 
    #	This program will run the tar backup of the Apache Web Server Programs to the backup partition
    #
    
    of=/media/LxBackup/Server-BU/www/www-$(date +%Y-%m-%d).tar.gz
    tar -cvz $of /var/www
    Many Thanks,

    IndyTim

    #2
    Re: KCron - Problem -- Scheduled Job

    Please post the complete crontab of the user in charge:

    Code:
    crontab -l

    Comment


      #3
      Re: KCron - Problem -- Scheduled Job

      just noticed one little issue...
      whatever the problem with crontab, your tar command's options are one short...

      not
      Code:
      tar -cvz $of /var/www
      but
      Code:
      tar -cvzf $of /var/www
      you need the f to specify the output file...

      cheers
      gnu/linux is not windoze

      Comment


        #4
        Re: KCron - Problem -- Scheduled Job

        Here's the output from crontab -l:

        Code:
        #
        35 4 27 7 *   /usr/local/bin/buwww.sh
        # This file was written by KCron. Copyright (c) 1999, Gary Meyer
        # Although KCron supports most crontab formats, use care when editing.
        # Note: Lines beginning with "#\" indicates a disabled task.
        I'll add back the "f" qualifier and re-compile.

        Thanks,

        IndyTim

        Comment


          #5
          Re: KCron - Problem -- Scheduled Job

          Originally posted by IndyTim
          /usr/local/bin/buwww.sh
          I'd change that to "/bin/bash /usr/local/bin/buwww" (add the shell, skip the ending), then try again ...

          Comment


            #6
            Re: KCron - Problem -- Scheduled Job

            Here's the modified bash script

            Code:
            #!/bin/bash 
            #	This program will run the tar backup of the Apache Web Server Programs to the backup partition
            #
            
            of=/media/LxBackup/Server-BU/www/www-$(date +%Y-%m-%d).tar.gz
            tar -cvzf $of /var/www
            I copied the bash script over to /usr/local/bin and re-compiled. Here's the output from crontab -l
            #
            35 4 27 7 * /usr/local/bin/buwww.sh
            # This file was written by KCron. Copyright (c) 1999, Gary Meyer
            # Although KCron supports most crontab formats, use care when editing.
            # Note: Lines beginning with "#\" indicates a disabled task.
            tzcbs0@pctim:~$ crontab -l
            #
            35 4 27 7 * /usr/local/bin/buwww.sh
            # This file was written by KCron. Copyright (c) 1999, Gary Meyer
            # Although KCron supports most crontab formats, use care when editing.
            # Note: Lines beginning with "#\" indicates a disabled task.
            I noticed that I still have the original bash script in crontab. I deleted it via KCron. Is there another way to purge this job from the cron jobs?

            Also, again in KCron, after I had configured the new buwww and scheduled, I selected the job and sent the run immediate command. Still no output.

            Any other suggestions?

            Many Thanks,

            IndyTim

            Comment

            Working...
            X