Erik Robertson
04/06/2022, 10:24 AMbundle: {
externalModules: ['pg-hstore'],
nodeModules: ['mysql2']
},
Now my question is how do I do the equivalent for a cron job definition ? I tried this without success :
new Cron(this, "Cleanup", {
schedule: "cron(0 9 * * ? *)",
job: "src/jobs/cleanup.main",
enableLiveDev: false,
bundle: {
externalModules: ['pg-hstore'],
nodeModules: ['mysql2']
},
});
Also is there any way to set this in a "global" way so that I don't have to repeat it everywhere ?
Thanks !Brinsley
04/06/2022, 10:29 AMApp
has setDefaultFunctionProps
which will allow you to set default config on to ALL sst.Functions in the application.
Which version of sst are you using?Erik Robertson
04/06/2022, 10:31 AMBrinsley
04/06/2022, 10:36 AMsetDefaultFunctionProps
route then I think you'll need to change your job definition to be FunctionProps
. CronProps
doesn't appear to extend it so those additional values aren't going to be processed by sst.Erik Robertson
04/06/2022, 12:47 PM