Setting up crontab, still cant get it to work


 
Thread Tools Search this Thread
Operating Systems Linux Setting up crontab, still cant get it to work
# 8  
Old 04-17-2011
If you don't know if it created /root/VoIPpackets, how do you know your cron script didn't work? Smilie
# 9  
Old 04-18-2011
No luck again. The cron did not start at the time it was set too.

Quote:
Did it at least create /root/VoIPpackets ?
No it did not create /root/VoIPpackets

I know that the script didnt run because it should have generated a number a files. Those files were not created.

I have tested the command and it does work the way I want it to.
I have just run the script from the command line, it worked but i did need to put

Code:
bash voippackets

Im not sure if its is the script that i wrote that isnt working, because of lack of proper syntax.
or
If my crontab isn't set properly.
# 10  
Old 04-18-2011
Quote:
Originally Posted by Nasasdge
No luck again. The cron did not start at the time it was set too.



No it did not create /root/VoIPpackets
[icode]ls -l /root/scriptfile.sh please

Quote:
I have tested the command and it does work the way I want it to.
I have just run the script from the command line, it worked but i did need to put

Code:
bash voippackets

If that works, it's definitely not named voippackets.sh Your crontab can't find it if you don't give it the actual name.

Also, if you need to run bash externally for it, it obviously isn't going to work in cron either, and likely isn't actually set executable.
Code:
chmod 755 /root/voippackets


Last edited by Corona688; 04-18-2011 at 03:30 PM..
# 11  
Old 04-18-2011
Code:
ls -l /root/voippackets.sh

OutPut:
Code:
-rwxr-xr-x   1 root     root          238 Apr 15 16:15 /root/voippackets.sh

Sorry i miss typed on the earlier post

I ran the script as
Code:
bash voippackets.sh

BTW
my crontab reads

Code:
0 8 * * 1,2,3,4,5 /root/voippackets.sh

thanks for taking so much time to help me.
# 12  
Old 04-20-2011
you could put 'bash /root/voippackets.sh' in your crontab I suppose...

---------- Post updated at 09:41 AM ---------- Previous update was at 09:32 AM ----------

to prove your cron is doing anything , at all, ever, without having to wait a whole week to tell, do this:

Code:
* * * * * touch /root/cronworks

# 13  
Old 04-20-2011
Thanks for your help,

I can in today, I didnt come into the office on tuesday, I found that the changes that I made to the cron and the script on monday have made it work,
YAY!

Thank you so much for your help.

Im thinking it was this that I needed

Code:
. /etc/profile

Thank you so much!!!
This User Gave Thanks to Nasasdge For This Post:
# 14  
Old 04-21-2011
No problem. that's probably the most common cron problem.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

[Crontab] didn't work

Hello, Here is my crontab # 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... (4 Replies)
Discussion started by: amazigh42
4 Replies

2. Shell Programming and Scripting

Crontab setting

Hi All, Can anyone tell me how to schedule the dbshell.sh script to run on sunday. I have scheduled as 1 19 7 * * /home/svr/dbshell.sh. kindly confirm confirm whether coded "7" or it should set to '0'. unix:$ crontab -l 0 19 6 * * /home/svr/dbemail.sh 1 19 7 * * /home/svr/dbshell.sh (2 Replies)
Discussion started by: arun888
2 Replies

3. UNIX for Dummies Questions & Answers

Crontab setting

Hi Team, Please help me to set one script in crontab. I have one script and inside script, its creating one log file for saving ouptut of script. i have to out that script in crontab. When i put the script in cronatab, it executed and log file created but no data in log. like this i put in... (3 Replies)
Discussion started by: shivshankar
3 Replies

4. Solaris

Crontab date setting problem

Hi, i wanted to schedule a backup script to run on 7.30pm every 1st Sat of month MAR, APR, SEP, OCT. Am i understanding it correctly? Because it doesn't seem to run according to the schedule i needed. = (7.30pm) & (1st to 7th day of the month) & (MAR, APR, SEP, OCT) & (Sat) 30 19 1-7... (1 Reply)
Discussion started by: beginningDBA
1 Replies

5. Solaris

Crontab date setting problem

Hi, 0 9 1,2,3,4,5,6,7 3,4 6 I want a cronjob to run on every 1st Sat of Mar & Apr. But the above schedule is running is running on the 1st 7 days. How do i rectify it? Thanks in advance. (2 Replies)
Discussion started by: beginningDBA
2 Replies

6. IP Networking

Setting to SSH home-PC from Work

Hello, My question is very basic for the settings to SSH my home PC from work. Home network two PC: Internet comes into my house through ISP modem and then the two PCs are connected with the router (Trendnet). The IPs for my PCs are How to set other stuffs for me to access my home PC from... (5 Replies)
Discussion started by: yifangt
5 Replies

7. Shell Programming and Scripting

Crontab setting error

Hi All, I have created crontab using following steps- 1) crontab -e (edited the file with) 0 10 * * 1-5 /home/user01/exercise/cron.sh 2) then saved this file with :wq 3) cron.sh contains the code- #!/bin/bash DAY=`date +%a` mkdir abc_${DAY} 4) done the execut permision... (3 Replies)
Discussion started by: pspriyanka
3 Replies

8. Shell Programming and Scripting

Setting crontab

Hey all, I would like to know how to set a cron job to run from 8:15 am to 4:00 pm? Or do I have to do this in 2 seperates cron? Thanks! (4 Replies)
Discussion started by: mpang_
4 Replies

9. Shell Programming and Scripting

Some env setting is causing the script not to work ?

Not sure what has changed in the Unix environment. The following script which was working is now not working. #!/usr/bin/ksh # ----------------------------------------------------------------------------- # File: monitor_db.sh # #... (1 Reply)
Discussion started by: uuser
1 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