nixCraft Linux Forum

nixCraft

Linux Tech Support Forum

crontab

This is a discussion on crontab within the Getting started tutorials forums, part of the Linux Getting Started category; i m trying to run on crontab 10 * * * * /usr/sbin/ntpdate -u xx.xx.xx.xx >> /var/synctime.log but it doesnt ...


Go Back   nixCraft Linux Forum > Linux Getting Started > Getting started tutorials

Register FAQ Members List Calendar Forgotten your password? Mark Forums Read
  #1 (permalink)  
Old 06-28-2007, 03:41 PM
Junior Member
User
 
Join Date: Jun 2007
My distro: suse
Posts: 9
Rep Power: 0
click007 is on a distinguished road
Unhappy crontab

i m trying to run on crontab

10 * * * * /usr/sbin/ntpdate -u xx.xx.xx.xx >> /var/synctime.log

but it doesnt work... check system > services > crontab is enabled

by manual command /usr/sbin/ntpdate -u xx.xx.xx.xx it's working

need help
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 06-29-2007, 02:52 AM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
My distro: Ubuntu
Posts: 1,061
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

Do you get any error? Do you run ntpdate as root user? Which Linux distro?
__________________
Vivek | My personal blog
Linux Evangelist
Play hard stay cool
Reply With Quote
  #3 (permalink)  
Old 06-29-2007, 12:54 PM
Junior Member
User
 
Join Date: Jun 2007
My distro: suse
Posts: 9
Rep Power: 0
click007 is on a distinguished road
Default no error but crontab is not working

./xntpd status
Checking for network time protocol daemon (NTPD): running

but crontab is not working..

i ran ntpdate command by root

i m running suse 9 enterprise

thanks
Reply With Quote
  #4 (permalink)  
Old 06-29-2007, 01:57 PM
Member
User
 
Join Date: Jul 2005
Posts: 85
Rep Power: 0
ricc
Default

run the command :

/etc/init.d/crond status

if it shows "running" then cron is running, then it shell ntpdate shall run.

But if it is not running you can start it with

/etc/init.d/crond start

to make it permanent so that it starts when the system is switched ON, you can run

insserv -a cron( or crond just not sure which one)

or

chkconfig crond on ( or crond just not sure which one)
Reply With Quote
  #5 (permalink)  
Old 07-02-2007, 01:14 PM
Junior Member
User
 
Join Date: Jun 2007
My distro: suse
Posts: 9
Rep Power: 0
click007 is on a distinguished road
Default thanks & another one

everytime i edited the crontab i have to restart cron...n now it's working

another problem is if i run the command like
"/usr/bin/top -n 1 >> /var/x1.log" manual working

but in the crontab
"0,10,20,30,40,50 * * * * /usr/bin/top -n 1 >> /var/x1.log" it's not working

the log file from /var/log/messages " Jul 2 13:30:00 soccer /USR/SBIN/CRON[4694]: (root) CMD (/usr/bin/top -n 1 >> /var/x1.log)"

but i cant find the log in "/var/x1.log"

could u plz help me?
Reply With Quote
  #6 (permalink)  
Old 10-03-2007, 04:16 PM
Junior Member
User
 
Join Date: Oct 2007
My distro: Fedora
Posts: 2
Rep Power: 0
angenet is on a distinguished road
Smile Crontab: help

Hi
I'm trying to setup a cron job to automatically run . But the cron is not working properly.
When I run the command, the output file is just blank.
Here is a sample of my Crontab, any help will be much appreciated.

#####################
# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file
# and files in /etc/cron.d. These files also have username fields,
# that none of the other crontabs do.
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# m h dom mon dow user command
00 3 * * * root /emu/script/./configupdate.sh >>/emu/log/configupdate.log >/dev/null 2>&1
00 * * * * root /emu/script/./keys.sh >>/emu/logfiles/keys.log >/dev/null 2>&1




Thanks
angenet
Reply With Quote
  #7 (permalink)  
Old 10-19-2007, 05:45 PM
Junior Member
User
 
Join Date: Oct 2007
My distro: Debian
Posts: 1
Rep Power: 0
rajeshtomar is on a distinguished road
Default Urgent

Hello dear,
i m facing problm with "crontab" when i m attaching the file. it is woking properly without using crontab.
so please ,send the proper solution for attaching the file with crontab. plz send the whole information regading to setting the crontab if it is. what r the reqirment for attaching the file with crontab.
is there any permisssion set...........
is ..any specific characterset.......
or any spesific setting plz give me the solution ...............

Rajesh Tomar
System Engineer
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Crontab lacloai Linux software 2 06-01-2007 04:44 AM
start and stop service in crontab. gthian Shell scripting 7 05-31-2007 12:04 PM
about crontab darknet Shell scripting 2 01-04-2007 07:01 PM
/etc/crontab file permissions or ownership can cause problem chiku Linux software 2 12-20-2006 02:57 AM
list every user's crontab script marinm Shell scripting 5 07-20-2005 12:24 AM


All times are GMT +5.5. The time now is 02:28 AM.


Powered by vBulletin® Version 3.7.4 - Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36