I was trying to redirect the TOP command output in the particular file in every 5 minutes with the below command.
top -b -n 1 > /var/tmp/TOP_USAGE.csv.$(date
Most likely the environment passed to your script from cron is too minimal. In particular, PATH
may not be what you think it is (no profiles are read by scripts started from cron).
Place PATH=$(/usr/bin/getconf PATH)
at the start of your script, then run it with
/usr/bin/env -i /path/to/script
Once that works without error, it's ready for cron.