Avrei bisogno di avviare una applicazione con una data differente da quella attuale
creando una automazione con appunto ( AUTOMATOR )
Diciamo avviare : calcolo stat.app in data 23 aprile 2014
e dopo averlo avviato dopo 30 secondi dall'avvio la data deve tornare all'attuale
ho trovato in rete questo:
ma non riesco a farlo, qualcuno di voi sa come farlo?
Grazie
--------------------------------------------------------------------------------------
I ran across a similar problem where I had to have a specific time to open an application. I solved this by using a few lines of bash.
Code:
tag1=$(date +%m)
tag2=$(date +%d)
tag3=$(date +%H)
tag4=$(date +%M)
tag=$tag1$tag2$tag3$tag4
sudo date 03050001
open "/Applications/Application.app"
sudo date $tag
Basically I take note of what time it is now (month, day, hour, minute) and then set the time to what I want it to be when the application opens it (here it is March 5th, 12:01 AM). The default format for the date in Macs is [[[mm]dd]HH]MM[[cc]yy][.ss]], nested in order of how it's read, so other things can be adjusted if necessary (cc means century).
I have a slight problem though, as the second sudo command prompts me to re-enter my password, even though I did that for the first sudo, and it's all one session. But that delay is only a few seconds. Also, if you're connected to the internet, even that doesn't matter, as allowing the time to be set automatically by Apple reverts to the correct time in ~10 seconds. If you want some more delay for the program to load, you can always put in
Code:
sleep 60
before the last line to make Terminal wait a minute before reverting back. Then you can toy with the variables and add a minute to the stored date to get the right time back.
--------------------------------------------------------------------------------------