storing the variable value while run from cron -


sh

!/bin/sh

export count=$(sqlplus -s 'username/passwd@xyz'<

when run script manual , script runs fine. when keep in crontab entry follows

27 16 * * * /www/abc/a4.sh >a4.log

the a4.log doesnot have data echoed.

please let know how hold value returned variable via sql query

instead of putting

&>> your_file.log 

behind line in

crontab -e 

try using

#!/bin/bash exec &>> your_file.log 

… @ beginning of bash script. use >> appends file rather overwriting it.


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -