Good day! I don't know what's the problem with this, I have two (2) entries in Crontab, these 2 entries are scripts which I've created. I need these 2 for automatic backup and maintaining only 3 files under a given directory. Here are my entries below, and they are NOT executing:
---------- Post updated at 09:26 AM ---------- Previous update was at 09:22 AM ----------
To add-up to, I've tried entering this below in Cron and YES it worked, but not for my 2 scripts. All permissions were already set to 777 even the sub-directory itself.
Firstly, I think that you need a "-f" between the expect string and the command string.
Secondly, most errors like this with expect under cron are caused by terminal or environment variable issues. A cron job knows nothing about TERM variable so if the job requires input, then it doesn't know where to go to get it. It also doesn't know where to send any output since it has no TERM. Send output to /dev/null if you can. Repeat, check terminal and environment variables needed by cron.