Question
Getting Crons to work on Ubuntu
I was encouraged to reach out to the community from the DO support for some help with Crons. I'm on Ubuntu and followed the guide on creating a cron https://www.digitalocean.com/community/articles/how-to-use-cron-to-automate-tasks-on-a-vps
I set my crontab to be:
* * * * * /srv/users/serverpilot/apps/mywebsite/protected/yiic.php email emailJob
(I'm using the Yii framework btw)
I tried to run the command directly through Putty by loading /srv/users/serverpilot/apps/mywebsite/protected/yiic.php email emailJob
and nothing seemed to happen. So I emailed DO. They said try a BASH script, make a new script "script.sh" and upload it to "#!/bin/sh". I made the script but when I used FileZilla to access that directory to put the new script I got the following error:
Error: Directory /bin/dash: no such file or directory
Error: Failed to retrieve directory listing
So I'm unsure really of how to proceed or what i'm doing wrong?
Add a comment
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×