I have a cron job setup on one of my servers users, and have tested it in the shell and it works fine. But now when I do a cronjob
I put this command in the command part of the cron setup for example with test.com:
DATADIR="/home/test/domains/test.com/public_html/data/"; STOREFILE="/testcron/cronjobhumor/newmedianame.txt"; OLDNAME=$(head -1 $STOREFILE); NEWNAME="media"$(stat -c %Z $DATADIR$OLDNAME); mv $DATADIR$OLDNAME $DATADIR$NEWNAME; echo $NEWNAME > $STOREFILE;
But when I look at the log I only get this out of the command from above, it stops just before %
Aug 8 23:04:01 server177 crond[17486]: (test) CMD (DATADIR="/home/test/domains/test.com/public_html/data/"; STOREFILE="/testcron/cronjobhumor/newmedianame.txt"; OLDNAME=$(head -1 $STOREFILE); NEWNAME="media"$(stat -c
Do I need to have something other than the %, and if so what would that replacement be
Thanks in advance
Mark
I put this command in the command part of the cron setup for example with test.com:
DATADIR="/home/test/domains/test.com/public_html/data/"; STOREFILE="/testcron/cronjobhumor/newmedianame.txt"; OLDNAME=$(head -1 $STOREFILE); NEWNAME="media"$(stat -c %Z $DATADIR$OLDNAME); mv $DATADIR$OLDNAME $DATADIR$NEWNAME; echo $NEWNAME > $STOREFILE;
But when I look at the log I only get this out of the command from above, it stops just before %
Aug 8 23:04:01 server177 crond[17486]: (test) CMD (DATADIR="/home/test/domains/test.com/public_html/data/"; STOREFILE="/testcron/cronjobhumor/newmedianame.txt"; OLDNAME=$(head -1 $STOREFILE); NEWNAME="media"$(stat -c
Do I need to have something other than the %, and if so what would that replacement be
Thanks in advance
Mark
Last edited: