Reputation: 143
My code:
exports.scheduledFunction = functions.pubsub.schedule('every 5 minutes').onRun((context) => { console.log('This will be run every 5 minutes!'); });
To deploy I run:
firebase deploy --only functions:scheduledFunction
When trying to deploy the schedule function am getting this issue
src/index.ts(490,18): error TS2339: Property 'schedule' does not exist on type 'typeof "/functions/node_modules/firebase-functions...'
Upvotes: 0
Views: 272
Reputation: 598623
The pubsub.schedule()
trigger was added in version 2.3 of the firebase-functions
library. Most likely you're using a version older than that.
Upvotes: 1