Cannot run crontab :1: bad minute error


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Cannot run crontab :1: bad minute error
# 1  
Old 09-21-2010
Cannot run crontab :1: bad minute error

Hi can any one help me out.
while running crontab , m getting error bad minute time..
how to resolve this error.
i created 1 txt file a.cron
mirrordir -vm \home\t \homet1
& i saved it.
then i created a crontab file ..with
crontab -e
& i added a line in it.
* 1 * * * \root\a.cron
& i save it.
when i run crontab a.cron
it comes up with error .. :1: bad mintue time
please help..thanks in advance
# 2  
Old 09-21-2010
Start by giving us more information (OS and version... since I dont know much UNIx accepting backslash like that...)

---------- Post updated at 13:09 ---------- Previous update was at 12:57 ----------

Quote:
i created 1 txt file a.cron
mirrordir -vm \home\t \homet1
& i saved it.
OK
Quote:
then i created a crontab file ..with
crontab -e
You didnt, You edited the existing one... And modified it...

Quote:
when i run crontab a.cron
it comes up with error .. :1: bad mintue time
And now you replaced your root crontab file by : a.cron

And what was the line in it already?

Not surprising you get that error message... but just one question :
How are you going to recover the original root crontab file with its contents, or was it just a test file?
# 3  
Old 09-21-2010
Were you logged in as "root" or as a normal user?

If this is an operational system you will be advised to get your Systems Administrator to repair the problem.



Assuming this is a training course on an expendable test system we can continue.

If you were logged in as root you have attempted to replace your root crontab with a file called "a.cron". This failed.
However I would have expected the error message:
"crontab: error on previous line; unexpected character found in line."
Even with your error message I doubt if it changed the crontab.

The script called "a.cron" contains errors. As a minimum in unix all backslash (\) characters should be solidus characters (/) in pathnames. If you have not tested the script you should not put it into a cron.


After repairing the script. You probably just need to run "crontab -e" again and change each backslash (\) to solidus (/). This is because unix syntax for a path is different from Microsoft syntax for a path.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Run script every minute and terminate after specified number of executions

when it runs and look at my acron.log file it generates an error as below /tmp/prog.sh: line 4: (12 Replies)
Discussion started by: azherkn3
12 Replies

2. Shell Programming and Scripting

Crontab error - bad hour

Hi All, While setting the crontab i am getting the below error, "/tmp/crontab.XXXXwKymEc" 156L, 15621C written crontab: installing new crontab "/tmp/crontab.XXXXwKymEc":74: bad hour Please help. Thanks (2 Replies)
Discussion started by: nag_sathi
2 Replies

3. Shell Programming and Scripting

Crontab not starting the application in every minute...

Hi Friends, I have developed a standalone java application which is deployed in a Linux environment. I have created a script for starting this application if the process is not running or else do nothing. The application is deployed as a .jar. I have also created a crontab entry like this... ... (1 Reply)
Discussion started by: Binoy Sankar
1 Replies

4. Solaris

Bad user root in crontab

Hi everyone, I got error which is "!bad user (root)" in crontab... I tried changing password, I checked etc/cron/cron.allow and cron.deny, And also I checked the permissions of my files, its(my crontab script) still not working.... Please help... (12 Replies)
Discussion started by: ijustneeda
12 Replies

5. AIX

My script didn't run every run every minute at cronjob

In my cronjob, I would like to schedule my script.sh to run every minutes. I crontab -e and have in line below but it didn't seems to run at all. * * * * * script.sh When I run it manually, I can run it. Is that anything wrong with the above line? If I change it to something like below,... (4 Replies)
Discussion started by: ngaisteve1
4 Replies

6. Shell Programming and Scripting

Crontab for every minute or every hour

How to set crontab for every minute or every hour (1 Reply)
Discussion started by: kaushik02018
1 Replies

7. UNIX for Advanced & Expert Users

crontab : bad minute error

when i say $crontab z it says ==> "z":6: bad minute "z":6: bad minute errors in crontab file, can't install. any clue why its happening? (1 Reply)
Discussion started by: crackthehit007
1 Replies

8. Shell Programming and Scripting

run script 1 minute interval without CronTab

I am using Solaris 9. I wish to run my script every 1 minute inteval. Though i can run it using below entry in crontab. * * * * /export/home/username/script/file_exist_&_run.sh in short above script will check whether a specific file exist in a directory. If it found it will inovke another... (10 Replies)
Discussion started by: thepurple
10 Replies

9. Shell Programming and Scripting

Run perl file in Crontab error.

Hi. I can run the script okay when I log in with root. Then I add this script to crontab and when crontab run i got this message error. I has installed DBD for Oracle already. I set ORACLE_HOME, ORACLE_BASE to root profile already. Please help me to fix it. It urgent. Thank so much. ... (2 Replies)
Discussion started by: raccsdl
2 Replies

10. Programming

how can i run a process for a whole minute?

here's the problem, i have two processes that i need to run and both process should be run at a total of 1 minute each. how do i do that? and one more here's what the processes do: the 1st process show the '+" sign infinitely while the 2nd process displays the "-" infinitely. how could i count the... (1 Reply)
Discussion started by: kelogs1347
1 Replies
Login or Register to Ask a Question