1
vote
time nohup ./script --> the time hasn't been logged
In your second attempt you measure the execution time of nohup command itself. So to get the build time you should put time after nohup:
nohup time ./mach build >my_log.log 2>&1 &
Also ...
1
vote
systemd not able to run some bash scripts
First, you should set a one-shot service, because your scripts exits when it's done:
[Unit]
Description = Runs the mountup.sh script
[Service]
Type = oneshot
User = adminuseraccount
ExecStart = /usr/...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
scripting × 1818bash × 391
linux × 334
powershell × 274
windows × 255
shell × 126
active-directory × 78
shell-scripting × 65
batch × 63
cron × 57
ssh × 55
windows-server-2003 × 55
automation × 55
ubuntu × 54
windows-server-2008 × 50
command-line-interface × 50
networking × 48
group-policy × 47
batch-file × 44
centos × 41
python × 37
unix × 33
vbscript × 33
email × 31
windows-server-2008-r2 × 30