Sunday, May 5, 2024
 Popular · Latest · Hot · Upcoming
0
rated 0 times [  0] [ 0]  / answers: 1 / hits: 928  / 2 Years ago, sun, june 19, 2022, 11:04:23

When I run crontab -e, I see this bit:




Notice that tasks will be started based on the cron's system daemon's notion of time and timezones.




How to convert the cron's system daemon's notion of time and timezones to something I understand or is there some way I can work it out?



I don't keep my machine on all the time and so I would like to set a daily time when my machine is most likely to be on.


More From » cron

 Answers
1

Problem: the introductory comments one sees when running crontab -e include these words:




Notice that tasks will be started based on the cron's system daemon's notion of time and timezones.




What that actually means is not clear to me that is why I asked the question.



So I ran crontab -e to have this line:



45 16 * * * touch /home/dbk/Desktop/$(date +%H:%M:%S).txt


What I'm asking cron to do is to create a file with the current time as prefix and .txt as extension and to do this at 16:45 h based on the cron's system daemon's notion of time and timezones.



Whenever the file is created, I can compare the prefix of the file with the "date modified" and thereby come to know what time cron ran the job.



As it so happens, cron ran the job at 16:45 IST which is my local time.


[#26557] Monday, June 20, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ideobedi

Total Points: 121
Total Questions: 108
Total Answers: 107

Location: United States Minor Outlying Island
Member since Sat, May 28, 2022
2 Years ago
;