0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【ReactNative】push通知のスケジュール設定で使う、Cron形式(firebase)とは?

Posted at

ReactNative(Expo)の開発で、push通知を実装する際に迷ったのでメモ。

以下が Cloud Functionsのスケジュール設定の構文

index.ts
exports.scheduledFunctionCrontab = functions.pubsub.schedule('5 11 * * *')
  .timeZone('America/New_York') // Users can choose timezone - default is America/Los_Angeles
  .onRun((context) => {
  console.log('This will be run every day at 11:05 AM Eastern!');
  return null;
});

(Firebase公式)
https://firebase.google.com/docs/functions/schedule-functions?hl=ja

('5 11 * * *')がCron(クーロン)形式と呼ばれるfirebaseのスケジュール設定の記法。

image.png

(GoogleCloud公式)
https://cloud.google.com/scheduler/docs/configuring/cron-job-schedules?hl=ja

初見の時は迷いました:cold_sweat:
ではでは。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?