I simply want to just run a command (actually its a shell script) from a given directory as a cron job. How can I run it so that it is set to a given directory without using
Your question makes little sense. Use
cd. If you ask for the answer not to use
cd because you've tried it and it didn't work, it's likely you didn't enter it correctly in the crontab.
The simplest way would be to write a small shell script that will cd and run your main task, then cron the script.
Just specify the path to the script. No need for
0 12 * * * /path/to/script args
If your script looks for files in
., then you will have to use
0 12 * * * cd /some/dir && /path/to/script args