You are not logged in.
Pages: 1
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
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
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 ![]()
Last edited by TuxLyn (2012-02-13 10:18:44)
::: Using Arch Linux Since October 25, 2011 :::
::: Tutorials: http://distrogeeks.com/ :::
Offline
@TuxLyn
To run cron every minute edit crontab to look like this:
*/1 * * * * /bin/echo testing123 >> /home/user/test.txtLast edited by Duka (2012-02-13 11:55:49)
Cthulhu Fhtagn!
Offline
@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.txtmeans the job will run in the first minute of every hour.
Offline
@Duka, thank you
This worked.
::: Using Arch Linux Since October 25, 2011 :::
::: Tutorials: http://distrogeeks.com/ :::
Offline
Pages: 1