I ma unfamiliar with git so bear with me, could this be an issue were you user account that is used to run the job as insufficient rights to git?
I ma unfamiliar with git so bear with me, could this be an issue were you user account that is used to run the job as insufficient rights to git?
Just to be shure...
Did you try the touch-script with absolute path in crontab?
Perhaps ~/script.sh expands to /root/script.sh as cron is run as root (?)
If you tried an absolute path with the git-script and
just redirected stdout the file is blank because it just tells you that there is no repository on stderr and exits.
Basti
@mfillpot
I don't think it's an issue with git. I tried other test scripts as well and none of them worked.
@bastlib
I used absolute paths with all the test scripts (and in crontab) and none of them worked. I also tried giving everyone permission to read, write, and execute the script to see if that helped (sudo chmod a+rwx script). It didn't. :(
...and just redirected stdout the file is blank because it just tells you that there is no repository on stderr and exits.
I'm not sure what you mean by this... Could you explain? I'm a noob. >_<;
Hi,
I thought your script produces an error and you won't see that in the output file if you had an entry like
* * * * * script.sh > output.txt
The last thing I can imagine is that you have to use the full path of touch like:
#!/bin/bash
/usr/bin/touch /home/dennis/delme.txt
To see where it is installed type
which touch
Basti
@bastlib
Wow, that actually worked. I was using full paths in the crontab and in the script itself for the file to touch, but I wasn't using the commands' full paths.
Thanks everyone for your help. :)
The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.
Join / Linux Training / Board