Delete active tasks in ProfileManager
Can I delete active tasks in the profilemanager? There are over 500 of them, and it stopped pushing to the devices.
Is there a command line for batch deleting?
Can I delete active tasks in the profilemanager? There are over 500 of them, and it stopped pushing to the devices.
Is there a command line for batch deleting?
23 people at the time of writing have this question too. We need a Cancel All button in the next version of Profile Manager.
Either that or we need Profile Manager to do its job and actually push to profiles that it's supposed to!
1. Launch the Terminal on the PM Server. You’ll find it in the Utilities folder under Applications.
2. Copy and paste in the following command. This command accesses the database that Profile Manager stores all of its data in and erases all of the tasks.
sudo psql -h "/Library/Server/PostgreSQL For Server Services/Socket" -U _postgres -d device_management -c "TRUNCATE TABLE tasks;"3. You will be asked for your password. Type it in and press enter.
When i use your command:
sudo psql -U _devicemgr -d devicemgr_v2m0 -h /Library/Server/ProfileManager/Config/var/PostgreSQL -c "DELETE FROM library_item_tasks WHERE completed_at IS NOT NULL"
It says:
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/Library/Server/PostgreSQL For Server Services/Socket/.s.PGSQL.5432"?
When i use this command:
sudo psql -U _devicemgr -d devicemgr_v2m0 -h /Library/Server/ProfileManager/Config/var/PostgreSQL -c "DELETE FROM library_item_tasks WHERE completed_at IS NOT NULL"
It says:
DELETE 0
Now when i go to Profile Manager there are still 200 active tasks running...
What i do wrong ?
sudo psql -h "/Library/Server/PostgreSQL For Server Services/Socket" -U _postgres -d device_management -c "TRUNCATE TABLE tasks;"Your commands were wrong....
Best
Hi Taerjerker,
Maybe u can explain me what i am doing wrong ?
This command works for me:
sudo psql -U _devicemgr -d devicemgr_v2m0 -h /Library/Server/ProfileManager/Config/var/PostgreSQL -c "DELETE FROM library_item_tasks WHERE completed_at IS NOT NULL"
But i still see the active tasks in Profile Manager...
Hi!
Please try this command:
sudo psql -h "/Library/Server/PostgreSQL For Server Services/Socket" -U _postgres -d device_management -c "TRUNCATE TABLE tasks;"It works great for me...
Best
Hi Tearjerker,
Thank you for your fast reply.
When i use your command it gives the following message:
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/Library/Server/PostgreSQL For Server Services/Socket/.s.PGSQL.5432"?
( sorry, i copy paste it wrong in my first message, i have try this command before ).
Hello All,
Is someone able to explain what is going on when you do this?
Is it wise?
Should any actions post be taken?
Thanks
Morgs
Hi there, this is because the command given clears COMPLETED tasks.
To delete ACTIVE tasks, use:
sudo psql -U _devicemgr -d devicemgr_v2m0 -h /Library/Server/ProfileManager/Config/var/PostgreSQL -c "DELETE FROM library_item_tasks WHERE completed_at IS NULL"
The difference is between the "IS NULL" and "IS NOT NULL".
Cheers!
Delete active tasks in ProfileManager