LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   give me cron job configuration plz (https://www.linuxquestions.org/questions/linux-newbie-8/give-me-cron-job-configuration-plz-802131/)

sandysingharoy 04-15-2010 04:44 AM

give me cron job configuration plz
 
I have done these steps. still its not working.

1. Log in as the root user.
2. I have created a file with name "reminder" in /root directory.
3. Create a /etc/cron.daily directory. Add a file called "taxrem", which reads a text file from home directory, so write a command in the "taxrem" : "cat ~/reminder"
4. Add command to /etc/crontab file. Based on the conditions I want, such as : 5 13 * * * root run-parts /etc/cron.daily

There is no entry in the cron.deny file. Still I have not get any response on that scheduled time. please help me. sandip singha roy

smoker 04-15-2010 05:05 AM

/etc/cron.daily should already exist

the file in cron.daily should be a script and be executable

but for what you are doing, all you need is the crontab entry

5 13 * * * /bin/cat /root/reminder

But if you are expecting an email from that you won't get one.

you would need something like

Code:

#!/bin/bash
cat /root/reminder | mail -s "Reminder" you@domain.com

as a taxrem script in cron.daily

or put that script somewhere else (/root) and add it to your crontab like

Code:

5 13 * * * /root/taxrem


All times are GMT -5. The time now is 10:13 AM.