Carl Johnson on 30 Apr 2010 07:24:04 -0700


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Script doesn't seem to run in cron...


This raises a question for me. Google hasn't been much help. How can
you manually run cron from the command line and show it's output?




Sent from my Treo™ wireless handheld device.

-----Original Message-----
From: Mike Leone <turgon@mike-leone.com>
Sent: Friday, April 30, 2010 9:29  AM
To: Philadelphia Linux User's Group Discussion List <plug@lists.phillylinux.org>
Subject: [PLUG] Script doesn't seem to run in cron...


I have a script I want to execute at a scheduled time. I can run the
script from the command line with no problems - it executes correctly.
But doesn't seem to run from cron (at least, I get no output files in  a
certain directory, as I do when I run it from a command line).

And I can't seem top find a cron log anywhere. I see in syslog that it
is executing (I think), but I don't know why it's not working.

$ sudo crontab -l
# m h  dom mon dow   command
  30 9  30   4   * /Scripts/Get-Invoices.sh


Get-Invoices.sh:
ssh account@ip.add.re.ss '/Scripts/snag-files.sh' && rsync -rvz
--timeout=30 --delete-excluded
account@ip.add.re.ss:/home/account/snagged-files/  /VendorInvoices/

-rwxr-xr-x  1 vadmin vadmin  186 2010-04-30 08:49 Get-Invoices.sh


If I run Get-Invoices from command line, it works fine, and transfers
files. Cron seems to be doing nothing.

Help, please. I'm just so frustrated at this point. Running from cronb
is (practically) the last step, and now it's being obstinate. :-)

Thanks

-- 
Michael J. Leone, <mailto:turgon@mike-leone.com>

PGP Fingerprint: 0AA8 DC47 CB63 AE3F C739 6BF9 9AB4 1EF6 5AA5 BCDF
Photo Gallery: <http://www.flickr.com/photos/mikeleonephotos>

USER ERROR: replace user and press any key to continue.

___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug