Crontab
To open Crontab write crontab -e
Best practice
So try and cd
into the project in crontab and then run your commends. The reason is that running the command directly nearly always gives errors with environment variables, finding files, etc.
Examples
So I have this at the top of my crontab for some reason. I think it was to get all my environment variables working so i fx can reference node
without specifying the specific location
Time examples
16:00 every day
Every second hour
Write logs to a file
You can write the logs of your call like this after your command:
So this is piping the logs into the file newest-log
Last updated