View Single Post
Old 27th September 2009, 16:33
Leszek Leszek is offline
Senior Member
Join Date: Nov 2006
Location: Poland,Włocławek
Posts: 369
Thanks: 22
Thanked 42 Times in 35 Posts
Send a message via Skype™ to Leszek

Your suggestion is good but it's working when I run Your script manually (sh /root/ When I try to make Cron do it nothing happens.
crontab -e
* * * * * sh /root/ > /dev/null
I have also tried using full path:
* * * * * /bin/sh /root/ > /dev/null
Here's a script from /var/scripts which Your script should execute:

groupadd someuser
useradd -d /home/someuser -s /bin/bash -m -g someuser someuser
echo "someuser:somepassword" | chpasswd
It's also working when I run it manually.

All that might seem a little strange because I haven't fully described what I'd like to do. The test server runs Apache (default installation) with php. A php script generates shell scripts in /var/scripts/ with information provided in the form. You know the rest. I'm close but I'm missing something here because Cron doesn't execute them.
Reply With Quote