Windows Task Scheduler and PowerShell scripts

Just a quick memo:

When you run PowerShell script using Task Scheduler remember to place „exit 4” at the end of script (without quotation marks). This code means that script has run successfully.


Sublime Text 2 save session on Ubuntu problem

I’ve had never before problems when using Sublime Text 2 (ST2) on my Windows 7 machine. Especially concerning my favorite feature which automatically opens files opened during last session. However I’ve faced such a problem on Ubuntu. Despite hot_exit and remember_open_files properties set to true, no files from last session had been opened. Some people even raised this as a bug (googled for it).

I’ve noticed strange behavior that when trying to change settings (some experiments) dialog box with permissions denied information appeared. However running ST2 using sudo command allowed me to save changes in settings files. So it appeared to me as permissions issue. If I can’t save settings as standard user then maybe session data can’t be saved in similar way. I’ve checked permissions for files in ~/.config/sublime-text-2/Settings and owner of all files had been set to root. I’ve called command:

sudo chown your_user_name Session.sublime_session

…and it works now as designed. After closing editor and opening it once again all files opened during last session are restored.