Results 1 to 5 of 5

Thread: Crontab entry not working

  1. #1
    Join Date
    Oct 2008
    Location
    Ottawa Canada
    Beans
    1,203
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Crontab entry not working

    This is my crontab:

    * * * * * rsync -r -n -t -p -g -v --delete -s /home/randy/Downloads/ /home/randy/Desktop/test # JOB_ID_1


    When I use Grsync and press the Make a full run button it works but when the same code is in a crontab it doesn't. Nothing happens. What should I do?
    Randy McElligott
    www.mcran.com

    For the best in Jazz, In Transition every Sunday from noon-2pm EST www.chuo.fm

  2. #2
    Join Date
    Feb 2009
    Location
    Dallas
    Beans
    1,355
    Distro
    Ubuntu Gnome 14.04 Trusty Tahr

    Re: Crontab entry not working

    Two things, if you run the command by itself in the terminal does it do what you expect? The other thing is you're telling the machine to run the command every minute. That's not a good idea. A more sensible command would be for once a day or maybe twice a day. Also restart the daemon when you make changes to the crontab.
    Last edited by lukeiamyourfather; October 4th, 2012 at 05:55 PM.

  3. #3
    Join Date
    Apr 2012
    Beans
    106

    Re: Crontab entry not working

    always try yo use full paths in your crontab, your command switches can also be comined to look a bit cleaner

    Code:
    * * * * * /usr/bin/rsync -rntpgv --delete -s /home/randy/Downloads/ /home/randy/Desktop/test # JOB_ID_1
    see if that helps at all

  4. #4
    Join Date
    Oct 2008
    Location
    Ottawa Canada
    Beans
    1,203
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: Crontab entry not working

    Thanks. All I want to do is test and see if my crontab works. Once it does, I will set up the approprite times for the crontab to work.So far no luck so what I would like to do is use the command line to set up a basic rsync. What could I do to test if just a basic simple rsync command works if that makes any sense.
    Randy McElligott
    www.mcran.com

    For the best in Jazz, In Transition every Sunday from noon-2pm EST www.chuo.fm

  5. #5
    Join Date
    Jul 2005
    Location
    England
    Beans
    Hidden!

    Re: Crontab entry not working

    Use a command like
    Code:
    /usr/bin/aplay /path/to/file.wav
    to test your crontab with any .wav file on your system.

    It should be obvious as you will hear it when it plays, if it plays. Full paths always should be used in cron as it will often not work if you use the normal terminal command for an application.
    DISTRO: Xubuntu 14.04-64bit --- Code-tags --- Boot-Repair --- Grub2 wiki & Grub2 Basics --- RootSudo

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •