I'm rather new to Linux. I recently wanted to learn how to work with Cron. So I wrote the following line to crontab file and it worked:
* * * * * date >> //home/os/system-date.txt
This line will append the current date and time in system-date.txt
every minute.
When I run the following command in terminal, time is printed in a specific format:
date +"%H-%M-%S"
For instance, 23-59-59
is printed.
But when I want to do this with Cron, nothing is written in the txt file. To be specific, when I write the following line in crontab
* * * * * date +"%H-%M-%S" >> //home/os/system-date.txt
nothing happens. I wonder why.