I need to run a script when i login for first time in a day. I may reboot or shutdown and then power on during the day. But i do not want the job to run during those power ups. It should run only once per day.
|
feedback
|
|
use Anacron can be used to execute commands periodically, with a frequency specified in days. Unlike cron(8), it does not assume that the machine is running continuously. Hence, it can be used on machines that aren't running 24 hours a day, to control daily, weekly, and monthly jobs that are usually controlled by cron. read the whole manpage. | |||||||||||
feedback
|
|
I wouldn't do that with cron - instead, configure the script to run whenever you log in, maybe by invoking it in | |||
|
feedback
|
|
Do required restrictions such as, run it at very first time and then log it in a file. Every run should read the log, to understand whether to proceed or exit. Update: For opening a GUI application at every login anyway ( not only on first login, do use the touch marker technique for achieving that ) here is the tutorial: How To Launch Applications Automatically During Startup | |||||
feedback
|