Hey there,
I am encountering some issues while trying to set up a cronjob on my Raspberry Pi. Although I believe that my code is correct, the cronjob does not seem to execute properly.
To access the crontab, I used the following command:
sudo crontab -e
Subsequently, I inserted the following line of code into it:
@reboot sleep 10 | node /PATH/index.js &
I also attempted this alternative approach:
@reboot sleep 10 && node /PATH/index.js &
After saving and exiting the file, I rebooted the system. Upon restarting, I checked if the cronjob was running with the following command:
Unfortunately, it appears that the cronjob is not being executed.
grep cron /var/log/syslog
The output showed that it is supposed to run the @reboot cronjobs, but they are currently not functioning as intended. Interestingly, my friend implemented the exact same code and steps successfully on his Raspberry Pi, yet it is not working on mine....
Thank you.