Here is my crontab:
42 17 * * 1-5 /bin/pkill -f 'MyExecutable.exe' ; touch /tmp/here.log
And according to /var/log/cron
it did run:
May 22 17:42:01 server1 CROND[326732]: (myuser) CMD (/bin/pkill -f 'MyExecutable.exe' ; touch /tmp/here.log)
And the process of MyExecutable.exe
did die. However, here.log
wasn't created in /tmp
.
If I manually run it under myuser:
touch /tmp/here.log
the file is created successfully (hence, not permission issue for sure). I even tried to move touch
into a separate cronjob in crontab, and it worked.
Why doesn't touch
after the semicolon run?
touch
isn't in the default crontab path (/usr/bin
)?