Yes, I am aware that the correct job didn't exist as it was only created yesterday. My question is how long will I have to wait for the cron job to run, or just when the server gets restarted.
The cron @reboot task launches after the server restarts, so when the hardware is reset. We do not plan to restart the server in the near future.
Is there a way to force the task to run? So that it can still be up without having the server restart?
If you want to run the task now (for testing purposes?), add a cron job to run it now at the chosen time.
If you still have questions about cron, read the official FreeBSD documentation regarding cron.
admin I do need this for production, as I'm using this to host the backend for my app. Would it eventually close if I made it run at a specific time?
cloverdev You can add a monitoring script on your end to monitor the operation of your application and start it if it's not running.
cloverdev Hello, i have the same issue with you: cron command not work after reboot. How can i receive the cron logs? Looking forward to your reply, thanks in advance.
admin I got the same issue,How can i get cron logs mail to my inbox? Looking forward to your reply, thanks in advance.
Juice168 Cron logs are accessible using the mail command. You can also redirect the output to a chosen file yourself.
admin Thank you for your reply. Can you give me a code example and when should I execute it?
Juice168 you can send the logs by setting MAILTO=inbox@example.com. If you want to redirect command output to file you can just use standard > FILE or >> FILE redirect.
MAILTO=inbox@example.com
> FILE
>> FILE
admin Ok I will try . Thank you very much 👍🙏