Reputation: 570
I am totally new to the cron jobs. Want to setup cronjobs.
Approach I used are not working
crontab -e
2 * * * * /home/user/Desktop/folder/scrapy crawl xyz
I want to see if its working every 2 minutes but didn't get any output.
I just want a simple step by step process to setup cronjobs.
Upvotes: 1
Views: 1614
Reputation: 763
Make your script runnable.
chmod +x /home/user/Desktop/folder/scrapy
And add :
#!/usr/bin/env/ python
to your script.
Your crontab is correct and cron will run the script with the given parameters every 2 minutes.
Upvotes: 1
Reputation: 821
Try to add PATH to your cron:
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
or #!/usr/bin/python
to top of script
Upvotes: 3