how to configure a crontask ?
My shell script in /home/ddmsuser/DDMSPurge/
in my crontab this is the first line Home = /home/ddmsuser/download-data Whatever shell scripts present under Home are configured in the crontab. How to configure a crontask when my script is in /home/ddmsuser/DDMSPurge/ ? Please help. |
This is a good reference -
http://corenominal.org/howto-setup-a-crontab-file/ When you configure crontab, you can use the full path to your script. Josh |
I have already tried doing that, but it fails to run as the class file it is supposed to execute is in another location.
|
It's not clear exactly what you want to do.
I assume you want to add the script in /home/ddmsuser/DDMSPurge/ to your existing list of cron jobs. If so, execute crontab -e from a terminal, and add this line: Code:
* * * * * * /home/ddmsuser/DDMSPurge/scriptname Replace the "scriptname" with the actual filename of your script. |
I have already tried what you said.. and got this error ? any ideas what can be done, your help is appreciated
Quote:
|
Quote:
(1) verify that runDDMSPurge.sh is the exact filename of the script (i.e. proper capitalization of the script filename and the path to the script) (2) I don't know why there is a dot (.) at the beginning of the path. Does the dot exist in the crontab? It shouldn't. |
Hey thanks, I removed the dot and it seems to have kick started it.. no error mail in the spool.
The dot was there for the other jobs so I followed suit. Thank you once again. |
A leading dot means start from the current dir. There's no such concept in cron, as all jobs run 'detached'. This is part of the reason you're usually advised to specify the complete absolute path to all cmds & files referenced in a cron job.
|
All times are GMT -5. The time now is 09:40 PM. |