First, if it’s not already done, you have to create an API Key on the Google Developer Console. Click here to see how.

Then, on your Siberian admin backend, go in “Settings”->”Push”, and enter your API key in the “GCM Key” field.

Return on the Google Developer Console, and on the left menu click on “Home”, then click on the ID of your Project and copy the “Project number”.

Go back to your Siberian admin backend, in “Settings”->”Push”, and paste this Project number in the “Sender ID” field.

Please note that these steps must be done before creating any APK! If not, the push notifications for these apps will not work on Android.

How to activate scheduled push notifications

You have to add an entry to your crontab.
A crontab is included in every server, and allows to execute some automatic tasks. You add an entry to the crontab and it executes the task when you have told him to do it. It can be a task to execute every 10am, every wednesday, etc.

In our case the crontab entry you have to create will launch the file that will check the scheduled notifications and send them.
Two ways to create your new crontab entry:

FROM THE ADMIN PANEL OF YOUR HOSTING
Search for your crontab manager. Add a new entry with these settings:

Minute: */10
Hour: *
Day of Month: *
Month: *
Day of Week: *
Command: wget http://www.mydomainname.com/push/message/send

Note:
– you will have to replace “www.mydomainname.com” by the url of your Siberian
USING SSH
Connect to your server using your SSH root access.
Enter: crontab -e
press enter
Press “i” to enable the insertion mode
Add this line at the end (you will have to replace “www.mydomainname.com” by the address of your Siberian): */10 * * * * wget http://www.mydomainname.com/push/message/send -q -O “/dev/null” > /dev/null 2>&1
press the “Esc” key
enter: :wq
press enter
enter: exit

Notes:

  • You have to change www.mydomainname.com by your own url of your Siberian install
  • In SSH the space between */10 and each * are tab space and not just normal space, and the one between wget and the url is a normal space
  • We have set the cron task to be executed every 10 minutes, but you can change it by the frequency of your choice (in */10 replace 10 by the number of your choice).

You are done!

Did You Find This Article Helpful?

Yes - 8 visitors found this post helpful
No - 1 visitors found this post was not helpful