You are not logged in.

#1 2012-02-13 09:33:32

TuxLyn
Member
From: United States
Registered: 2011-10-26
Posts: 283

[SOLVED] cronie (crontab) not working

I can't get my crond to work for some reason. I'ts already started by crond in rc.conf and I'm apart of users group. When I create a simple command such as this bellow its not working;

crontab -e

# run every minute to test
1 * * * * /bin/echo testing123 >> /home/user/test.txt

crontab: installing new crontab

of course I replace "user" with my own system user.

Any ideas what is up ?

Last edited by TuxLyn (2012-02-13 17:23:59)


::: Using Arch Linux Since October 25, 2011 :::
::: Tutorials: http://distrogeeks.com/ :::

Offline

#2 2012-02-13 10:00:42

skunktrader
Member
From: Brisbane, Australia
Registered: 2010-02-14
Posts: 1,682

Re: [SOLVED] cronie (crontab) not working

The easy way to tell whether its "working" or not is to look in /var/log/crond.log

Try creating a 1 line shell script instead of the literal commands in the crontab

Offline

#3 2012-02-13 10:13:50

TuxLyn
Member
From: United States
Registered: 2011-10-26
Posts: 283

Re: [SOLVED] cronie (crontab) not working

Thanks for the tip, I did not think of looking there.
I've created crontab in /etc/ with command "sudo touch /etc/crontab".
But it looks like it did not help. Still not working for some reason.

Feb 13 03:11:57 localhost crontab[15939]: (user) BEGIN EDIT (user)
Feb 13 03:12:01 localhost crontab[15939]: (user) REPLACE (user)
Feb 13 03:12:01 localhost crontab[15939]: (user) END EDIT (user)
Feb 13 03:12:01 localhost /usr/sbin/crond[15381]: (root) CAN'T OPEN (/etc/crontab): No such file or directory
Feb 13 03:12:01 localhost /usr/sbin/crond[15381]: (user) RELOAD (/var/spool/cron/user)

note: I've replaced real user with word user for security smile

Last edited by TuxLyn (2012-02-13 10:18:44)


::: Using Arch Linux Since October 25, 2011 :::
::: Tutorials: http://distrogeeks.com/ :::

Offline

#4 2012-02-13 11:55:31

Duka
Member
From: R'lyeh
Registered: 2010-04-16
Posts: 34

Re: [SOLVED] cronie (crontab) not working

@TuxLyn

To run cron every minute edit crontab to look like this:

*/1 * * * * /bin/echo testing123 >> /home/user/test.txt

Last edited by Duka (2012-02-13 11:55:49)


Cthulhu Fhtagn!

Offline

#5 2012-02-13 12:00:15

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] cronie (crontab) not working

Duka wrote:

@TuxLyn

To run cron every minute edit crontab to look like this:

*/1 * * * * /bin/echo testing123 >> /home/user/test.txt

+1

1 * * * * /bin/echo testing123 >> /home/user/test.txt

means the job will run in the first minute of every hour.

Offline

#6 2012-02-13 17:17:23

TuxLyn
Member
From: United States
Registered: 2011-10-26
Posts: 283

Re: [SOLVED] cronie (crontab) not working

@Duka, thank you smile This worked.


::: Using Arch Linux Since October 25, 2011 :::
::: Tutorials: http://distrogeeks.com/ :::

Offline

Board footer

Powered by FluxBB