root@ubuntu-512mb-lon1-01:~/Documents# crontab -l
0 * * * * @root /usr/bin/screen -dmS sh /root/Documents/schedulejob.sh
if I place /usr/bin/screen -dmS sh /root/Documents/schedulejob.sh in command area is work but cron didnt work. Please advice
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.
Click below to sign up and get $100 of credit to try our products over 60 days!
Cron executes its scripts in an environment that is significantly different from the normal shell environment. In particular, the PATH variable has different values (and slightly different meaning) in cron context. Moreover, the vixie cron is sensitive to newlines; the crontab file must end with a blank line or the last cron in the file will be ignored.
Try replacing sh with /bin/sh