Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Apr 2019 15:13:34 -0500
From:      Software Info <softwareinfojam@gmail.com>
To:        "freebsd-stable@freebsd.org" <freebsd-stable@freebsd.org>
Subject:   Crontab Question
Message-ID:  <5cae4e6f.1c69fb81.95785.62bf@mx.google.com>

next in thread | raw e-mail | index | archive | help
Hi All
I am trying to schedule cron to run a script. The script is in my home dire=
ctory and so I added my home directory to the path file in /etc/crontab bel=
ow.
PATH=3D/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:~/bin:/=
home:/home/me

This is the crontab entry for the scheduled  task below.
49      14      *       *       1-5     root    myscript.sh

myscript.sh grabs a file from another directory if it is there. If not, it =
says =E2=80=9Cfile not uploaded=E2=80=9D. If the file is there, it copies i=
t to my home directory, strips email addresses out of it and uses mailx to =
send emai to those users. I keep getting the error that a number of files i=
n my home directory are missing but they are not.=20

Please see errors below
mv: rename *.csv to listing.csv: No such file or directory
grep: listing.csv: No such file or directory
/home/me/ipo-script.sh: cannot open body.txt: No such file or directory
mv: rename /home/me/listing.txt to /home/me/listing.txt-10-04-19-1435: No s=
uch file or directory
mv: rename /home/me/listing.csv to /home/me/listing.csv-10-04-19-1435: No s=
uch file or directory
mv: rename /home/me/listing.txt-10-04-19-1435 to /home/me/IPO-Backup-Files/=
listing.txt-10-04-19-1435: No such file or directory
mv: rename /home/me/listing.csv-10-04-19-1435 to /home/me/IPO-Backup-Files/=
listing.csv-10-04-19-1435: No such file or directory

Because I added my home directory to the path in crontab, I am at a loss to=
 explain why this is still happening. Anyone have any ideas? Would really a=
ppreciate some help.

Kind Regards
SI



Sent from Mail for Windows 10




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5cae4e6f.1c69fb81.95785.62bf>