Seeking Assistance: Custom Cronjob Causing Interface Issue – Need Help Locating and Modifying Cronjobs

bl4nk

Cadet
Joined
Nov 22, 2023
Messages
3
Hello,
I am experiencing an issue with cronjobs. I created a custom cronjob, and since then, my interface is no longer displaying(Loading indefinitely).
However, the cronjobs continue to run. I would like to modify some cronjobs, but I don't know where to find them. The /var/cron/tabs directory is empty.

Could you please let me know in which directory the cronjobs are stored?

Thank you.

1700647344901.png

1700647378337.png
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
They are stored in the TrueNAS SQLite config database ...

Besides, you should probably recreate this thread in the proper forum - this is for legacy (EOL) FreeNAS releases and probably not getting much attention. You are not running FreeNAS 11, are you?


or


You can probably get rid of the cron job by using the sqlite command on the database. I hope someone knowing these things from memory can join in to help.
 

bl4nk

Cadet
Joined
Nov 22, 2023
Messages
3
Hello,

Thank you for your reply,

Indeed, I am currently using FreeNAS 11, and I am creating a model of my current configuration to see if everything will function correctly during the upgrade to TrueNAS. I understand that for the jails, I will need to upgrade the releases if I want to make modifications to them, and for my vm i will need to power off them before the ugrade too. For the rest, it seems that nothing will change. However, since I don't have access to my cron jobs on FreeNAS, I am unable to replicate them in my model to verify that during the transition to TrueNAS, my cron jobs will remain unaffected.

No problem, i'll recreate this thread in an other forum which is more appropriate.
Thank you
 

bl4nk

Cadet
Joined
Nov 22, 2023
Messages
3
They are stored in the TrueNAS SQLite config database ...

Besides, you should probably recreate this thread in the proper forum - this is for legacy (EOL) FreeNAS releases and probably not getting much attention. You are not running FreeNAS 11, are you?


or


You can probably get rid of the cron job by using the sqlite command on the database. I hope someone knowing these things from memory can join in to help.
I have resolved the issue that was causing disruptions in the cronjobs interface. It turned out that a cronjob was scheduled to run on the 31st of February(Typographical error, most likely), which triggered the problem. To address this, I examined the database located at /data/freenas-v1.db using the following commands:


sqlite3 /data/freenas-v1.db .tables

These commands allowed me to list the tables present in the database, and I identified the 'tasks_cronjob' table. Next, I inspected the schema of the table with the command:


.schema tasks_cronjob

To view the currently existing cronjobs, I used the command:


SELECT * FROM tasks_cronjob;

That's where I spotted a cronjob scheduled for the 31st of February. I corrected this by executing the following command:

UPDATE tasks_cronjob SET cron_daymonth = 1 WHERE id = 'cron id';

This resolved the issue by adjusting the cronjob to run on the 1st day of the month.

Hope that could help someone who encounters the same problem.

Thank you
 
Top