[Solved] Error while updating the crontab


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers [Solved] Error while updating the crontab
# 1  
Old 10-18-2013
[Solved] Error while updating the crontab

When I update the crontab, I get error message. Any idea?

Code:
 
0 0-23 * * * /usr/local/scripts/monitor.sh > /dev/null    ( BEFORE)
 
*/5 * * * *  /usr/local/scripts/monitor.sh > /dev/null  (Now) it doesn't allow me to save the work.

Error message...
Code:
 
crontab: */5 * * * * /usr/local/scripts/monitor.sh > /dev/null
crontab: error on previous line; unexpected character found in line.
crontab: warning: commands will be executed using /bin/sh

# 2  
Old 10-18-2013
The way of writing "*/5" instead of "5,10,15,20,25,30,...." is a Linux extension to the standard cron syntax. You haven't said which system you are on, but if it is not a Linux system you probably got a syntax warning from your cron.

I hope this helps.

bakunin
This User Gave Thanks to bakunin For This Post:
# 3  
Old 10-18-2013
What editor did you use? Possibly a windows editor adding a <carriage return> character? Do you have the necessary <line feed> at the end of the line?
This User Gave Thanks to RudiC For This Post:
# 4  
Old 10-18-2013
Quote:
Originally Posted by bakunin
The way of writing "*/5" instead of "5,10,15,20,25,30,...." is a Linux extension to the standard cron syntax. You haven't said which system you are on, but if it is not a Linux system you probably got a syntax warning from your cron.

I hope this helps.

bakunin
I am on SCO Unix.

Code:
 
#uname -a
SCO_SV djx1 3.2 5.0.6 i386
root@djx1#echo $TERM
vt100
root@djx1#echo $EDITOR
vi

As you told me, I did 5,10,15,20... and worked. I guess it's doesn't like */5

Thank you so much.

Moderator's Comments:
Mod Comment edit by bakunin: thread title changed to "Solved".

Last edited by bakunin; 10-22-2013 at 05:04 AM..
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Log file is not updating when I run shell scripts scheduled thru crontab

Hi Forum, Good Day! I have created an empty html file wtih permissoin 777 created shell script(with permission 777) , code is below. #=======================start============== . /data09/oracle/apps_st/appl/D_oraapp095.env rm -rf /home/mnp/Test_log.txt echo... (1 Reply)
Discussion started by: kartheekbk
1 Replies

2. UNIX for Dummies Questions & Answers

[Solved] Crontab

Hi I need my script to run at 7:30, 7:40, 7:50 & 8:00 AM. Defined like: 30,40,50 7,8 * * * sh myscript.sh But this runs even at 8:30, 8:40, 8:50 - which I don't need.. Please advise. (4 Replies)
Discussion started by: ashokvpp
4 Replies

3. Shell Programming and Scripting

[Solved] Shell script not working in crontab

Hi Iam running below script in crontab but its not working. #!/bin/sh cd /Scripts /usr/local/bin/expect -f /Scripts/bng_backup.exp /Scripts/data.txt tar -cf bngbackup.tar bngbackup ;gzip bngbackup.tar when iam running manually the output file is generating..but bngbackup.tar.gz file... (5 Replies)
Discussion started by: surender reddy
5 Replies

4. UNIX for Advanced & Expert Users

[Solved] Crontab not launching script

Hi all, i have the following script #!/bin/sh for i in `ps -leaf --cols 1024 | grep LogUser | grep -v grep | awk '{print $4}'`; do echo $i kill -15 $i; done; but it seems that the crontab its sciping this script,i configured corntab as following */30 * * * root... (2 Replies)
Discussion started by: charli1
2 Replies

5. Shell Programming and Scripting

[Solved] echo not updating double quotes in output

Hi , I have a script to update firefox proxy. But the echo is not updating the double quotes. paste /home/names.txt /home/ip.txt | while read i j do mkdir $i echo "user_pref("network.proxy.http", "$j");" >> /home/$i/prefs.js echo "user_pref("network.proxy.http_port", 8080);" >>... (3 Replies)
Discussion started by: ranjancom2000
3 Replies

6. UNIX for Dummies Questions & Answers

[Solved] crontab scheduling

Hi, We can schedule a new job using crontab -e. is there any other way to achieve the same(opening the file directly and add an entry). I have tried to access /var/spool/crontabs directory. But i am getting permission denied error, Please help me. Thanks (8 Replies)
Discussion started by: pandeesh
8 Replies

7. Solaris

Error updating Firmware in X4500

I have X4500 machine with solaris 10 OS and software version 5.10. The firmware version is 1.1.1 and I am planning to upgrade the firmware. C H A P T E R 1 - Flash Upgrading Your Server to Software Release 1.2 I referred to the above link to do so. But, I do not understand what is the... (6 Replies)
Discussion started by: bharu_sri
6 Replies

8. Shell Programming and Scripting

awk updating one file with another, comparing, updating

Hello, I read and search through this wonderful forum and tried different approaches but it seems I lack some knowledge and neurones ^^ Here is what I'm trying to achieve : file1: test filea 3495; test fileb 4578; test filec 7689; test filey 9978; test filez 12300; file2: test filea... (11 Replies)
Discussion started by: mecano
11 Replies

9. Post Here to Contact Site Administrators and Moderators

Error updating profile

I'm trying to update my profile with a temp e-mail address. This is a hotmail e-mail address and it wont allow it. The reason for this is I've changed my service with my ISP since I've moved :D and well I've gone form Cable to DSL :mad: Now my e-mail accounts are still there but I can't... (4 Replies)
Discussion started by: woofie
4 Replies
Login or Register to Ask a Question