LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-27-2004, 07:35 PM   #1
kd5giv
LQ Newbie
 
Registered: Mar 2004
Distribution: Slackware Lastest
Posts: 18

Rep: Reputation: 0
Crontabs


Hello,
I use Slackware 9.1 and for some strange reason I not getting crontab to do anything. Maybe I'm using it wrong.

SHELL=/bin/csh

# getsao
#02 * * * * $GEMDATA/obs/surface/
02 * * * * /home/gempak/gempak/data/obs/surface/getsao
# getruc
#47 * * * * /usr/bin/run-parts /etc/cron.hourly 1> /dev/null



This is the data in a file named cron. If I use 'crontab cron' wouldn't that be all there is to make cron run the script 'getsao'? I want cron to run the getsao script at :02 passed they hour each hour of everyday.
 
Old 04-27-2004, 07:40 PM   #2
AltF4
Member
 
Registered: Sep 2002
Location: .at
Distribution: SuSE, Knoppix
Posts: 532

Rep: Reputation: 31
is "/home/gempak/gempak/data/obs/surface/getsao" readable and executable ?
(chmod u+rx /home/gempak/gempak/data/obs/surface/getsao)
 
Old 04-27-2004, 09:27 PM   #3
kd5giv
LQ Newbie
 
Registered: Mar 2004
Distribution: Slackware Lastest
Posts: 18

Original Poster
Rep: Reputation: 0
Well the getsao script is permissioned. As the user I typed 'chmod +x getsao'. The script runs good when I run it manually. Now the file named 'cron' is a viewable file but not executable.
 
Old 04-28-2004, 08:25 PM   #4
AltF4
Member
 
Registered: Sep 2002
Location: .at
Distribution: SuSE, Knoppix
Posts: 532

Rep: Reputation: 31
use "crontab -e"
this will start up your editor and load the active contab for you
insert desired lines and write+quit
 
Old 04-28-2004, 09:08 PM   #5
kd5giv
LQ Newbie
 
Registered: Mar 2004
Distribution: Slackware Lastest
Posts: 18

Original Poster
Rep: Reputation: 0
Well I even tried Kcron and it doesn't even work.
 
Old 05-05-2004, 07:49 PM   #6
AltF4
Member
 
Registered: Sep 2002
Location: .at
Distribution: SuSE, Knoppix
Posts: 532

Rep: Reputation: 31
is the cron daemon active ?
 
Old 05-07-2004, 02:13 AM   #7
kd5giv
LQ Newbie
 
Registered: Mar 2004
Distribution: Slackware Lastest
Posts: 18

Original Poster
Rep: Reputation: 0
Hello,
Well using the command 'ps aux' I get this output. (More information after the output.)

USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 14.0 0.1 484 236 ? S 07:06 0:04 init
root 2 0.0 0.0 0 0 ? SW 07:06 0:00 [keventd]
root 3 0.0 0.0 0 0 ? SWN 07:06 0:00 [ksoftirqd_CPU0]
root 4 0.0 0.0 0 0 ? SW 07:06 0:00 [kswapd]
root 5 0.0 0.0 0 0 ? SW 07:06 0:00 [bdflush]
root 6 0.0 0.0 0 0 ? SW 07:06 0:00 [kupdated]
root 10 0.0 0.0 0 0 ? SW< 07:06 0:00 [mdrecoveryd]
root 56 0.0 0.0 0 0 ? SW 07:06 0:00 [eth0]
root 66 0.0 0.4 1400 532 ? S 07:06 0:00 /sbin/dhcpcd -t 1
bin 76 0.0 0.4 1520 564 ? S 07:06 0:00 /sbin/rpc.portmap
root 82 0.0 0.5 1444 620 ? S 07:06 0:00 /usr/sbin/syslogd
root 85 0.0 0.3 1376 460 ? S 07:06 0:00 /usr/sbin/klogd -
root 87 0.0 0.4 1412 540 ? S 07:06 0:00 /usr/sbin/inetd
root 90 0.5 1.1 3080 1416 ? S 07:06 0:00 /usr/sbin/sshd
lp 99 0.0 1.0 3372 1228 ? S 07:06 0:00 lpd Waiting
root 104 0.0 0.4 1496 556 ? S 07:06 0:00 /usr/sbin/crond -
daemon 106 0.0 0.5 1504 644 ? S 07:06 0:00 /usr/sbin/atd -b
root 109 0.0 1.7 4748 2020 ? S 07:06 0:00 sendmail: accepti
smmsp 112 0.0 1.6 4732 1952 ? S 07:06 0:00 sendmail: Queue r
smmsp 114 0.0 1.8 4804 2216 ? S 07:06 0:00 sendmail: ./i460C
root 116 0.0 0.3 1420 472 ? S 07:06 0:00 gpm -m /dev/mouse
root 118 0.1 1.1 2312 1316 tty1 S 07:06 0:00 -bash
root 119 0.0 0.4 1368 480 tty2 S 07:06 0:00 /sbin/agetty 3840
root 120 0.0 0.4 1368 480 tty3 S 07:06 0:00 /sbin/agetty 3840
root 121 0.0 0.4 1368 480 tty4 S 07:06 0:00 /sbin/agetty 3840
root 122 0.0 0.4 1368 480 tty5 S 07:06 0:00 /sbin/agetty 3840
root 123 0.0 0.4 1368 480 tty6 S 07:06 0:00 /sbin/agetty 3840
root 136 0.0 0.6 2704 756 tty1 R 07:07 0:00 ps aux


Is there something wrong with that? Where should I look to see if the right command was made? A file is created in the '/var/spool/crontabs/' directory with the commands that are to be run.

Last edited by kd5giv; 05-07-2004 at 02:17 AM.
 
Old 05-07-2004, 09:37 PM   #8
AltF4
Member
 
Registered: Sep 2002
Location: .at
Distribution: SuSE, Knoppix
Posts: 532

Rep: Reputation: 31
are you trying to run cron jobs as root ?

if not: check if you are allowed to run cron commands

read "man crontab" and if nneded check /var/spool/cron/allow
 
Old 05-08-2004, 04:37 AM   #9
carboncopy
Senior Member
 
Registered: Jan 2003
Location: Malaysia
Posts: 1,210
Blog Entries: 4

Rep: Reputation: 45
well check out /etc/
there is cron.daily, cron.hourly. cron.weekly and cron.monthly
Just copy your script to of the following directory and it will run according to the directory name.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
nothing in /usr/spool/cron/crontabs Furlinastis Slackware 5 06-04-2005 10:16 PM
Whats the difference between all the crontabs (system, root, users) ? glenn69 Linux - Newbie 2 10-12-2004 07:41 PM
where can I find the source of the program crontabs prad Linux - General 3 02-12-2003 07:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:50 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration