Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

crontab hates me


  • Please log in to reply
3 replies to this topic

#1 mckooter

mckooter

  • Members
  • 211 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Maine
  • Local time:08:37 PM

Posted 01 May 2009 - 05:25 PM

right now the contents of my crontab file are as such:

# MIN   HOUR   MDAY  MON  DOW   COMMAND
   1	 *	  *	 *	*	'cp /opt/foldingathome/1/FAHlog.txt /var/www/fah/FAHlog.txt'

im trying to copy my FAHlog.txt to a web accessable directory every minute, but it does not run, ive tried everything, even putting the command in an sh file and exexuting it that way, i never get the file in the right directory

whats my issue, and man do i hate crontab


and yes ive verified its running:

mckooter@myserver:~$ ps ax | grep crond
17626 pts/0	S+	 0:00 grep crond

Edited by mckooter, 01 May 2009 - 05:27 PM.

You can just call me Chris

I found out I was Marilyn Monroe in a previous life


BC AdBot (Login to Remove)

 


#2 Andrew

Andrew

    Bleepin' Night Watchman


  • Moderator
  • 8,260 posts
  • OFFLINE
  •  
  • Gender:Not Telling
  • Location:Right behind you
  • Local time:05:37 PM

Posted 02 May 2009 - 01:44 PM

I'm not a crontab expert, not by a long shot, but I think that your problem may be that you enclosed the command in quotes. Try removing them.

#3 mckooter

mckooter
  • Topic Starter

  • Members
  • 211 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Maine
  • Local time:08:37 PM

Posted 02 May 2009 - 03:59 PM

yeah, the quotes are a new thing, i have tried it without the quotes too, i read on a forum post that they may have been nessisary

no go either way...
You can just call me Chris

I found out I was Marilyn Monroe in a previous life


#4 Carpetsmoker

Carpetsmoker

  • Members
  • 31 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Eindhoven, Netherlands
  • Local time:01:37 AM

Posted 13 May 2009 - 01:51 PM

Some things you can try and other random notes in case you didn't find a solution yet:

The one and only way to edit a crontab file is to use:
# contrab -e
Do not edit the crontab file directly!

You do not need to enclose the command in quotes.

Which flavour of cron are you using? There are many different flavours.

Can you try a simple command to see if cron is working at all, for example touch ~/cronworks

Can you post your complete crontab file? And also the root's crontab file (/etc/crontab).

[EDIT]

and yes ive verified its running:

CODE
mckooter@myserver:~$ ps ax | grep crond
17626 pts/0 S+ 0:00 grep crond


Looking at your post again, I noticed I don't see cron running!
Are you sure it is running? Because this doesn't show it's running, the entry that pops up is the grep process, *not* the cron process itself.
As a sidenote, cron can also be named crond, grepping for cron is better.

Output should look something like:
[~]% ps ax | grep cron
  873  ??  Is	 0:00.01 /usr/sbin/cron -s
 2818  p1  S+	 0:00.00 grep --color cron

Edited by Carpetsmoker, 13 May 2009 - 01:55 PM.

UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users