[Crontab] didn't work


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting [Crontab] didn't work
# 1  
Old 04-03-2017
[Crontab] didn't work

Hello,

Here is my crontab
Code:
# Reboot one Sunday out of 2 at 02:00
0 2 * * 0/2 /usr/bin/reboot

2017-04-16
2017-04-23
2017-04-30
and so on

I tested my crontab here, it seems to work
Http://cron.schlitt.info/index.php?c...=100&test=Test

However on my distrib linux mageďa
When I register my crontab, I have the error
HTML Code:
Bad day-of-week
Errors in crontab file, can not install
Thank you for your help
# 2  
Old 04-03-2017
You did not say what OS its for. cron is implemented differently on linux v.s. Std UNIX systems
# 3  
Old 04-03-2017
I mentioned it.
This is Mageia based Mandriva
# 4  
Old 04-03-2017
Sorry, still half asleep... I wonder if the one sunday out of 2 is understood...
# 5  
Old 04-03-2017
What does your man crontab say about step values? Mine says
Quote:
Step values can be used in conjunction with ranges. Following a range with ``/<number>'' specifies skips of the number's value through the range.
So - 0/2 wouldn't work.

And, looking again at it, that wouldn't satisfy your logics either. Day-of-week 0-7/2 would mean Sunday, Tuesday, Thursday, Saturday .

Use 0 and discriminate every other Sunday within the script.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Linux

Setting up crontab, still cant get it to work

OK I have been working on this simple action for a while and I cannot get it to work. First off im new to the linux command line world. I feel like I am missing something simple. What I am trying to achieve is that I want this command: tcpdump -s2000 -w'flowroute-%H%M.pcap' -G900 -W36 &to... (13 Replies)
Discussion started by: Nasasdge
13 Replies

2. UNIX for Dummies Questions & Answers

emulate aix 5.3 , how ....? pearpc didn't work

how to emulate aix 5.3 i had try pearpc , but it didn't work ... someone have some solution? thanks (1 Reply)
Discussion started by: prpkrk
1 Replies

3. SCO

Hard disk clone of OpenServer 5.0.0 didn't work, why?

Continuing saga of working on making a retail store more robust by creating a backup clone of the main server, a 1995 era :eek: PC running SCO OpenServer 5.0.0b and a discontinued Point of Sales (POS) software system. I have a PC of the same make and model. The CPU runs faster and it has a... (5 Replies)
Discussion started by: jgt10
5 Replies

4. Shell Programming and Scripting

awk: assign variable with -v didn't work in awk filter

I want to filter 2nd column = 2 using awk $ cat t 1 2 2 4 $ VAR=2 #variable worked in print $ cat t | awk -v ID=$VAR ' { print ID}' 2 2 # but variable didn't work in awk filter $ cat t | awk -v ID=$VAR '$2~/ID/ { print $0}' (2 Replies)
Discussion started by: honglus
2 Replies

5. Shell Programming and Scripting

SED - replace with new line didn´t work for solaris

Hi This is what I was trying to do, comment one line and add something different in a new line right next. This is the command I want to do more .profile | sed 's,STRING1, #STRING1 NEWLINE STRING2,' (I´m using ',' because my string is something like this exec... (3 Replies)
Discussion started by: alcalina
3 Replies

6. UNIX for Dummies Questions & Answers

starce didn't work

Hello, I am learning to debug in sgi-Irix6.5, after a core dump, I was adviced to perform a "strace", but I got the following information: ERROR: tracer already exists what shall I do now? Thanks a lot Daniel (0 Replies)
Discussion started by: lakeat
0 Replies

7. Shell Programming and Scripting

script to start DB didn't work, help

I have created a script to strat and shutdown Oracle 10g DB on Solaris automatically when UNIX reboot. In the begining, it worked well. All of sudden, the dbstart part didn't work, other 3 part for lsnrctl, emctl, isqlplusctl all worked fine. I think it was TNS_ADMIN variable got problem. Because... (0 Replies)
Discussion started by: duke0001
0 Replies

8. Shell Programming and Scripting

mail program on shell script didn't work, please advise.

Hi, everyone: I post a new thread because previous post may sink and I hope the new one can be caught by your eyes. I created a shell script and the script works fine. However, the mail program part on script didn't send email to my email box and it also didn't provide any traceable... (7 Replies)
Discussion started by: duke0001
7 Replies

9. Shell Programming and Scripting

script didn;t work in cron !!! @_@

Hi all, I am writing a script to monitor some processes existence in the system. It works perfectly by running the script manually in commend line. However, when I put it under cron to run it failed. Everything time when the variable is null in the if statment. it failed and quitted. Here is... (2 Replies)
Discussion started by: stancwong
2 Replies

10. UNIX for Dummies Questions & Answers

crontab -e dosent work

Hello! my crontab -e dosent work. Im getting this error message: sh: VI: not found The crontab files was not changed. How do i make it work? I think you should use "export editor=vi" or something. But i cant seem to get the correct line! pleas help... (11 Replies)
Discussion started by: dozy
11 Replies
Login or Register to Ask a Question