cron job in crontab not working

Tag: linux , ubuntu , cron , crontab Author: dengjiaming22042 Date: 2013-06-23

I have added the following entry:

*/1 * * * * /home/coddict/myapp-dev/spoolemailsender

and the shell that I am trying to execute (the file spoolemailsender) has the following:

#!/bin/sh

php app/console swiftmailer:spool:send --env=dev

Why isn't this script running every 1 minute? Do I need another command to get this cron job running?

how do you edit your crontab ?
@Pierre-LouisLaffont by calling crontab -e
You can try removing the /1 : * * * * * /home/coddict/myapp-dev/spoolemailsender

Other Answer1

You forgot to put user to execute cron job:

*/1 * * * * root /home/coddict/myapp-dev/./spoolemailsender

or

*/1 * * * * root sh /home/coddict/myapp-dev/spoolemailsender

root for example.
Assuming spoolemailsender is executable script and you don't need to do ./spoolemailsender or sh spoolemailsender

comments:

actually I need to do ./spoolemailsender to run the script.. is that an issue?
can be, add that to cron job
what do you mean add that to the cron job?
*/1 * * * * root /home/coddict/myapp-dev/./spoolemailsender, sorry for my simplicity :D
Is it working now?