cron job question


 
Thread Tools Search this Thread
Operating Systems Linux cron job question
# 1  
Old 02-29-2008
cron job question

I created a cron script that runs on the command line but not in crontab. What could be causing it to not run ?
# 2  
Old 02-29-2008
I check the cron log and had this line..what does it mean ?

Feb 29 13:30:01 COM1 crond[24755]: (root) CMD /usr/local/cron/logs)
# 3  
Old 02-29-2008
MySQL

Please put the command in executables(Tick)..for example
'cp /path /newpath'
Please try
# 4  
Old 02-29-2008
Sorry I dont understand. Put what command and where is executables ? I'm completely lost.
# 5  
Old 03-01-2008
Hi dannyd,

Basically, just ensure that your script is executable first then place it in crontab.

eg. my script name is dailyreboot.sh
Edit crontab and specify running timing with your script name
# crontab -e

Editing mode, insert like
# to reboot server everyday
00 03 * * * /root/adm/bin/dailyreboot.sh 2&1> /dev/null

To save and exit
:wq!

You can check in your cron log, whether it get executed on specified time...

Hope this will help.
# 6  
Old 03-03-2008
I did all that.

For some reason it executes fine on the command line but not as a crontab.

When I run it in the command line it says Interactive mode enabled. What does that mean ?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Cron job question

Hi, I have a cron job that I want to run twice a week, on Tues/Thurs, and I want it to run three times - specifically at 10pm, 11:10pm, and 12:20am respectively. I "think" the way to do this is to run the following: 00,10,20 22,23,00 * * 2,4 MYCOMMAND Just wanted to verify this... (4 Replies)
Discussion started by: xdawg
4 Replies

2. Shell Programming and Scripting

Cron job - Need to run Cron every quarter at particular time

Hi, 1) If some job supposed to run on 1st of every month at 7 AM In cron job when we have a blackout on the 1st ( i.e when 1st falls on a sunday ) how can we make the job run the next business day? 2) How can we run a job on 25th of every quarter 7 AM(jan,apr,jul,oct) And if 25th... (5 Replies)
Discussion started by: System Admin 77
5 Replies

3. Shell Programming and Scripting

Commented cron job -- cron monitoring

Hi I have a requirement to write a shell script,that will check the all commented job in cron job.Please help !! (2 Replies)
Discussion started by: netdbaind
2 Replies

4. Solaris

Cron job running even after cron is removed

Hi , I have removed a cron for particular user , but cron job seems to be running even after the cron entry is removed. The purpose of the cron was to sendmail to user ( it uses mailx utility ) I have restarted cron and sendmail service still user is getting mail alerts from the cron job. And... (4 Replies)
Discussion started by: chidori
4 Replies

5. Shell Programming and Scripting

Curious cron job question

Wow that was annoying, I wrote a huge long entire post out, clicked submit and the damn thing lost my entire post. Ok, here's what I am needing to do. Have a cron job run every six days at a random minute and hour ONLY ONCE on that day. Would this work? */30 */3 * * */6 command ... (3 Replies)
Discussion started by: Ashberry
3 Replies

6. UNIX for Dummies Questions & Answers

cron job

Hi, How to monitor whether a cron job is running or errored out..?other than checking the process using ps-aef how to enter the cron job which throws the output in 1 file and errors in other file. i remember it can be done using >1 and >2 ..but not sure.. any expert..please help!! (1 Reply)
Discussion started by: rujus
1 Replies

7. Solaris

cron job starts new cron proccess

I run cron in solaris 10 zone. One cron job which syncing files to nfs mounted on container, creates after finishing another cron proccess(/usr/sbin/cron), and after 100 existing cron proccesses next cron job will not start. It's too weird for me, I'm not able to solve this problem. Theoretically... (3 Replies)
Discussion started by: ron76
3 Replies

8. UNIX for Dummies Questions & Answers

CRON usage for CRON job

can anybody explain the usage of CRON for adding a cron job. please provide an example also for better understanding !!! Thanks (1 Reply)
Discussion started by: skyineyes
1 Replies

9. UNIX for Dummies Questions & Answers

Cron Job

Hi everybody ....I am trying to write a cron job for event based subscription for a tool called Microstrategy...if anybody have idea about this please help me... Thanks in advance ark (7 Replies)
Discussion started by: arksal
7 Replies

10. Shell Programming and Scripting

cron job

how do you schedule a job to run at the last day of the in a single crontab line for example if I put a crontab entry of 0 0 31 * * /path_of_my_script the above will only run if the last day of the months is 31, what happens if the last day of the month is 28 or 30. if I put a crontab... (4 Replies)
Discussion started by: hassan2
4 Replies
Login or Register to Ask a Question