Does crontab take command line arguments? [closed] Does crontab take command line arguments? [closed] shell shell

Does crontab take command line arguments? [closed]


Yes, crotab lines can get arguments as the man page says so.

Most likely something goes wrong while calling that command that resides in the change of environment from your console to the not-a-console cron environment.

Usually its best to add logging functions to your cron line to get the output of whats happening.

*/5 * * * * sh /home/adhikarisubir/test/basic_unix/trace_bkp.sh 2 /home/adhikarisubir/test/basic_unix /home/adhikarisubir/test_bkp >> /home/adhikarisubir/test/basic_unix/cron.log 2>&1

Then read that log and you will see how it goes wrong.