-
Notifications
You must be signed in to change notification settings - Fork 320
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Doesn't work when used within proces runner such as PM2 or CRONtab? #226
Comments
@kunokdev did you end up figuring this out? It seems I'm having the same problem. |
@NicolasPerl Unfortunately, I haven't. Spent whole night debugging linux |
Can confirm this is working: #148 |
I'm trying to send notifications from cron, and the notifications don't display under ubuntu 19.04. Trying to run So in my .sh script I've added |
My experience with this is, running via pm2, it works out of the box on my Mac, but not on a Win10 machine. (the script run by itself shows the notification on Win10, but not if run via pm2). Still trying to figure it out. |
Actually, upon further testing, it appears that my issue on Windows 10 was linked to the way I had pm2 starting up. I used nssm (Non-Sucking Service Manager) to make pm2 startup on Win10. At first I made it startup as a system user, which was the main problem. After I edited the pm2 service with nssm to start as a specific regular user, notifications worked for me. Hoping this can help someone. |
Related to #333 |
I've added script to my crontab somewhat like this:
code runs, however there is no notification.
Same issue with PM2. So it appears that when it's being ran by some different process, not from user's shell, then it fails to send notification to desktop.
Same issue when using with
gnome-session-properties
. Linked SO question: https://stackoverflow.com/questions/49221716/when-using-notify-send-inside-some-process-runner-such-as-cron-or-pm2-notificatVersions:
Ubuntu 16.04 Gnome3 (gubuntu distro).
notify-send 0.7.6
"node-notifier": "^5.2.1",
The text was updated successfully, but these errors were encountered: