Your suggestion is good but it's working when I run Your script manually (sh /root/script.sh). When I try to make Cron do it nothing happens.
Code:
* * * * * sh /root/script.sh > /dev/null
I have also tried using full path:
Code:
* * * * * /bin/sh /root/script.sh > /dev/null
Here's a script from /var/scripts which Your script should execute:
Code:
#!/bin/bash
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.
Recent comments
1 day 9 hours ago
1 day 12 hours ago
1 day 13 hours ago
1 day 15 hours ago
1 day 16 hours ago
1 day 18 hours ago
1 day 19 hours ago
2 days 11 hours ago
2 days 12 hours ago
2 days 16 hours ago