Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem with simple cron

Status
Not open for further replies.

linuxMaestro

Instructor
Jan 12, 2004
183
US
I have a file
crontest
#!/bin/bash
wall hi

in crontab -e i have
* * * * * /home/crontest

root@server [/home]# ll | grep cron
-rwxr-xr-x 1 root root 21 Aug 18 15:50 crontest*

How ever it doesnt run...
Aug 18 15:21:22 server crontab[1151]: (root) BEGIN EDIT (root)
Aug 18 15:22:13 server crontab[1151]: (root) REPLACE (root)
Aug 18 15:22:13 server crontab[1151]: (root) END EDIT (root)
Aug 18 15:22:47 server crontab[1159]: (root) BEGIN EDIT (root)
Aug 18 15:23:10 server crontab[1159]: (root) END EDIT (root)
Aug 18 15:23:11 server crontab[1162]: (root) BEGIN EDIT (root)
Aug 18 15:23:19 server crontab[1162]: (root) END EDIT (root)
Aug 18 15:25:03 server crontab[1731]: (root) BEGIN EDIT (root)
Aug 18 15:25:17 server crontab[1731]: (root) REPLACE (root)
Aug 18 15:25:17 server crontab[1731]: (root) END EDIT (root)
Aug 18 15:27:37 server crontab[1737]: (root) BEGIN EDIT (root)
Aug 18 15:27:42 server crontab[1737]: (root) END EDIT (root)
Aug 18 15:29:27 server crontab[2303]: (root) BEGIN EDIT (root)
Aug 18 15:33:27 server crontab[2303]: (root) REPLACE (root)
Aug 18 15:33:27 server crontab[2303]: (root) END EDIT (root)
Aug 18 15:47:40 server crontab[3487]: (root) BEGIN EDIT (root)
Aug 18 15:48:21 server crontab[3487]: (root) REPLACE (root)
Aug 18 15:48:21 server crontab[3487]: (root) END EDIT (root)
Aug 18 15:49:20 server crontab[3503]: (root) BEGIN EDIT (root)
Aug 18 15:49:28 server crontab[3503]: (root) END EDIT (root)
Aug 18 15:51:08 server crontab[3518]: (root) BEGIN EDIT (root)
Aug 18 15:51:21 server crontab[3518]: (root) REPLACE (root)
Aug 18 15:51:21 server crontab[3518]: (root) END EDIT (root)
Aug 18 15:51:33 server crontab[3533]: (root) BEGIN EDIT (root)
Aug 18 15:51:36 server crontab[3533]: (root) END EDIT (root)
Aug 18 15:53:13 server crontab[3545]: (root) BEGIN EDIT (root)
Aug 18 15:53:32 server crontab[3545]: (root) REPLACE (root)
Aug 18 15:53:32 server crontab[3545]: (root) END EDIT (root)
Aug 18 15:57:53 server crontab[3574]: (root) BEGIN EDIT (root)
Aug 18 15:58:19 server crontab[3574]: (root) END EDIT (root)

Got any tips?
 
Hi,

Your wall command is wrong. Example:

wall filename

You have "wall hi". Wall command require filename that contains text. Create a file called "hi" and enter text "hi" inside hi file. Refer to wall man page for more info.

dbase77
 
Hi,

Your crontab looks ok, but are you sure you want to run it ***** which basically means every minute (24/7)?

Watch your path since cron doesn' inherit this, I think it just uses a default value. See man page on crontab.

LEE
 
Check you are allowed to execute cron jobs see cron.allow /var/adm/cron/cron.allow


Verify that cron demon is running if not start this from the command line.

Also include the absolute path of the wall command

whereis wall might show you this or find / -name "*wall*"

man on cron will show you examples on syntax of the cron command

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top