LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-02-2004, 01:54 PM   #1
nodger
Member
 
Registered: Oct 2003
Location: Ireland
Distribution: Slackware 9.1, Ubuntu
Posts: 192

Rep: Reputation: 30
Cronjob won`t work in /var


If I shedule a cron job in /root it works fine but if I transfer the same cron job to /var it doesn`t get executed. I`m running as root
 
Old 11-02-2004, 01:59 PM   #2
dthacker
Member
 
Registered: Nov 2003
Location: Omaha, NE
Distribution: Ubuntu, Kubuntu, Ubuntu Server
Posts: 77

Rep: Reputation: 15
Cron ususally needs a full path to whatever you want it to run, for example

5 * * * * /var/runmyjob.sh (Run the shell script runmyjob.sh at 5 minutes after every hour.)

Are you using a full path? To remove all doubt, post your crontab.
 
Old 11-02-2004, 02:12 PM   #3
nodger
Member
 
Registered: Oct 2003
Location: Ireland
Distribution: Slackware 9.1, Ubuntu
Posts: 192

Original Poster
Rep: Reputation: 30
I tried again just now (to be 100% sure) and its still not working, I just created a simple shell script like this:

Code:
#!/bin/bash
ls > output.txt
, called that "crontest.sh" , set the execute bits, and added the following entry to the crontab:

Code:
* * * * * /var/crontest.sh
<newline>
Didn`t run. I tried the exact same thing under /root and it ran no probs. Im using Redhat 9. Im stumped
 
Old 11-02-2004, 06:44 PM   #4
nodger
Member
 
Registered: Oct 2003
Location: Ireland
Distribution: Slackware 9.1, Ubuntu
Posts: 192

Original Poster
Rep: Reputation: 30
Unhappy

Can anyone help? This seems very strange does it not?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
BootP won;t work but DHCP will rhaley Linux - Networking 1 06-10-2005 11:37 AM
Boot screen won,t work help!!!!!! drysac Mandriva 4 11-02-2004 12:07 PM
Why won’t this init.d startup script work? dholingw Linux - Software 2 06-08-2004 02:40 PM
Why won’t this Java Script Work? dholingw Programming 4 02-25-2004 03:41 PM
Network won`t work on Solaris 9 x86 with RTL8139 Pollyanna Solaris / OpenSolaris 1 12-26-2003 10:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:00 PM.

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