I would like to append current date to text file every morning at 7am. if the computer is turned off I would like it to be executed after its turned on.
Tell me more
×
Ask Ubuntu is a question and answer site for
Ubuntu users and developers. It's 100% free, no registration required.
|
Write
Save that in a file under The files in |
||||
|
|
|
setup a cron job with the following bash script
execute this script at bootup and at 7 o'clock. To keep things simple, this script also writes the current date if the computer boots up before 7 o'clock, but only once a day. It creates two files: lastexecution which holds the date of the last time the batch file wrote the date into the file and datefile, where it appends the current date. |
|||
|
|