BleepingComputer.com: crontab hates me

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

crontab hates me cant get a simple cp command to work

#1 User is offline   mckooter 

  • Forum Regular
  • PipPipPip
  • Find Topics
  • Group: Members
  • Posts: 211
  • Joined: 29-May 08
  • Gender:Male
  • Location:Maine

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

This post has been edited by mckooter: 01 May 2009 - 05:27 PM

You can just call me Chris

Pandy said:

I found out I was Marilyn Monroe in a previous life

#2 User is offline   Andrew 

  • Bleepin' Night Watchman
  • PipPipPipPipPipPip
  • Find Topics
  • Group: Moderator
  • Posts: 7,422
  • Joined: 05-December 05
  • Gender:Not Telling
  • Location:Right behind you

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.
Help us help you. If HelpBot replies, you MUST follow step 1 in its reply so we know you need help.
Posted Image
Boredom Software Stop Highlighting Things

#3 User is offline   mckooter 

  • Forum Regular
  • PipPipPip
  • Find Topics
  • Group: Members
  • Posts: 211
  • Joined: 29-May 08
  • Gender:Male
  • Location:Maine

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

Pandy said:

I found out I was Marilyn Monroe in a previous life

#4 User is offline   Carpetsmoker 

  • Member
  • PipPip
  • Find Topics
  • Group: Members
  • Posts: 31
  • Joined: 31-March 09
  • Gender:Male
  • Location:Eindhoven, Netherlands

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]

Quote

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

This post has been 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.

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users