I am trying to schedule a job using crontab, but it is not giving any output. The same thing I am able to do through a script, and is solving my problem. But I would like to know what mistake I am doing here in crontab due to which it is not working.
17 12 * * * /usr/bin/ls -ltr /home/saad/Desktop/labels/ | /usr/bin/grep _label_of_ | /usr/bin/grep $(date -d '1 day ago' '+%d%m%Y') >> /home/saad/Desktop/log
find /home/saad/Desktop/labels/ -type d -mtime -1 -exec /usr/bin/grep -E "_label_of_ {} >> /home/saad/Desktop/log \;
more or less depending of the exact content & ouptut needed – francois P Jun 22 '23 at 08:49