@salmankhan2482 It depends, what exactly is the flag supposed to do? Is it related to that particular invoice or job? If it's related to the job you can pass that flag inside the constructor of your job.
it actually stores the value from the check box input. and i am trying to solve it by inserting it in the database and then retrieve it from the database in cron job.
Cron jobs are from the cli, Their processes do not have session, there are other alternative
You can persist the "bill_full_payment_check" to the database in your invoice table
or you can explain what you are really trying to do
@salmankhan2482 Sessions are used in web requests. A queued job is executed on the command line; there is no session. You need to pass any information your job needs to run as a parameter.
It also doesn’t make sense to use sessions in a queued job. The user can log out of your website in the browser before the queue’s picked up and processed the job.
thank you sir for the reply and i did forget the session when the job is done. hence the session cannot be accessed in cron job so i followed the method to insert it in the database and then access it from the database.